This question already has an answer here:
While reading about 11.12 Limitations of Shell Builtins I came across the following:
To loop over positional arguments, use:
for arg do echo "$arg" done
You may not leave the do on the same line as for, since some shells improperly grok:
for arg; do echo "$arg" done
It doesn't seem to explain anymore detail than that.
- What shells have a problem with this syntax?
- What is the problem?