COUNT=0 echo "You have entered $# arguments:" for ARG in $* do echo "#`expr $COUNT + 1`: $ARG" done
I can't seem to get the COUNT variable to increase for each listed argument. For example, if I enter something like:
./FILE_NAME one two three
I ended up getting this:
You have entered 3 arguments: #1: one #1: two #1: three



Help

Back to top









