1: #!/bin/sh 2: # 3: # Check positional argument handling 4: echo "Number of arguments: $#" 5: echo "\$0 = $0" 6: 7: echo "Loop over \$*" 8: for a in $*; do 9: echo \"$a\" 10: done 11: 12: echo "Loop over \"\$@\"" 13: for a in "$@"; do 14: echo \"$a\" 15: done
last modified 22/03/2012 | Introduction | Table of Contents (frame/no frame) |
Printable (single file) |
© Dartmouth College |