Skip to content

Commit

Permalink
improve echo-args.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Mar 16, 2014
1 parent 94c0534 commit 8c92a74
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions echo-args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ redEcho() {
}

echoArg() {
index=$1
count=$2
value=$3
local index=$1
local count=$2
local value=$3

echo -n "$index/$count: "
redEcho "["
Expand All @@ -27,6 +27,5 @@ echoArg() {
echoArg 0 $# "$0"
idx=1
for a ; do
echoArg $idx $# "$a"
idx=$((idx + 1))
echoArg $((idx++)) $# "$a"
done

0 comments on commit 8c92a74

Please sign in to comment.