| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# Invoke this script both with and without arguments, |
| 4 |
#+ and see what happens. |
| 5 |
|
| 6 |
for a |
| 7 |
do |
| 8 |
echo -n "$a " |
| 9 |
done |
| 10 |
|
| 11 |
# The 'in list' missing, therefore the loop operates on '$@' |
| 12 |
#+ (command-line argument list, including whitespace). |
| 13 |
|
| 14 |
echo |
| 15 |
|
| 16 |
exit 0 |