We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 52a31c3 + 200be3c commit e2f3a98Copy full SHA for e2f3a98
spark
@@ -27,6 +27,16 @@
27
# Generates sparklines.
28
#
29
# $1 - The data we'd like to graph.
30
+_echo()
31
+{
32
+ if [ "X$1" = "X-n" ]; then
33
+ shift
34
+ printf "%s" "$*"
35
+ else
36
+ printf "%s\n" "$*"
37
+ fi
38
+}
39
+
40
spark()
41
{
42
local n numbers=
@@ -53,9 +63,9 @@ spark()
53
63
54
64
for n in $numbers
55
65
do
56
- echo -n ${ticks[$(( ((($n-$min)<<8)/$f) ))]}
66
+ _echo -n ${ticks[$(( ((($n-$min)<<8)/$f) ))]}
57
67
done
58
- echo
68
+ _echo
59
69
}
60
70
61
71
# If we're being sourced, don't worry about such things
0 commit comments