Skip to content

Commit

Permalink
Use $0 in the usage, instead of hardcoding the name "spark"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome Leclanche committed Dec 21, 2013
1 parent e2f3a98 commit fae5393
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spark
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,18 @@ if [ "$BASH_SOURCE" == "$0" ]; then
# Prints the help text for spark.
help()
{
local spark=$(basename $0)
cat <<EOF
USAGE:
spark [-h|--help] VALUE,...
$spark [-h|--help] VALUE,...
EXAMPLES:
spark 1 5 22 13 53
$spark 1 5 22 13 53
▁▁▃▂█
spark 0,30,55,80,33,150
$spark 0,30,55,80,33,150
▁▂▃▄▂█
echo 9 13 5 17 1 | spark
echo 9 13 5 17 1 | $spark
▄▆▂█▁
EOF
}
Expand Down

0 comments on commit fae5393

Please sign in to comment.