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 f in $(a; b); do :; done not supported #4

Closed
Artoria2e5 opened this issue Oct 27, 2015 · 7 comments
Closed

for f in $(a; b); do :; done not supported #4

Artoria2e5 opened this issue Oct 27, 2015 · 7 comments

Comments

@Artoria2e5
Copy link

This happens on explainshell.com.

@idank
Copy link
Owner

idank commented Oct 27, 2015

Can you give a complete example? One of the links on the front page is

for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l 2>/dev/null;
done
On Oct 26, 2015 5:04 PM, "Mingye Wang" notifications@github.com wrote:

This happens on explainshell.com.


Reply to this email directly or view it on GitHub
#4.

@Artoria2e5
Copy link
Author

( IFS=/; set -ef -- /D/a-b*; for f in $(ls -rtd "$@"; echo /); do [ -n "${f##D*}" ] || continue; mv "${1%/*}/${f%?}" "/r${1%/*}-a"; done ).

Sorry for making such premature conclusion on the title.

@Artoria2e5
Copy link
Author

Tracked down to for f in $(a; b); do :; done. Updating title..

@Artoria2e5 Artoria2e5 changed the title for var in $(command-subst) not supported for f in $(a; b); do :; done not supported Oct 27, 2015
@Artoria2e5 Artoria2e5 changed the title for f in $(a; b); do :; done not supported for f in $(a; b); do :; done not supported Oct 27, 2015
@idank
Copy link
Owner

idank commented Oct 27, 2015

It seems like any command substitution with a comma doesn't work, even $(a; b).

@Artoria2e5
Copy link
Author

Hmm. Backtick ones work though.

@idank
Copy link
Owner

idank commented Oct 27, 2015

Yeah, I'll have to walk through the code with a debugger to see what's wrong. ETA: unknown. :(

@idank idank closed this as completed in 334ce7d Jan 31, 2016
@Artoria2e5
Copy link
Author

Wow.

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

2 participants