Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"for arg do" is reported as syntax error despite being valid #45

Closed
cdown opened this issue Nov 29, 2013 · 1 comment
Closed

"for arg do" is reported as syntax error despite being valid #45

cdown opened this issue Nov 29, 2013 · 1 comment

Comments

@cdown
Copy link

cdown commented Nov 29, 2013

The shorthand for for arg in "$@"; do, for arg do (note: without the requirement of a semicolon), is reported as a violation of SC107{3,2}, but it is explicitly permitted by POSIX, and in fact is more portable than for arg; do (with semicolon).

A script that triggers this:

for arg do
    echo "$arg"
done
@cdown
Copy link
Author

cdown commented Nov 29, 2013

Duplicate of #44.

@cdown cdown closed this as completed Nov 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant