2 ms·
Yeah, for commands, the input/output redirections can precede them, but for some reason it doesn't work for builtin constructs like `while`: $ < <( echo fo
by aaaaaaaaaaab 5y ago
Yeah, for commands, the input/output redirections can precede them, but for some reason it doesn't work for builtin constructs like `while`:
$ < <( echo foo ) while read -r f; do echo "$f"; done
-bash: syntax error near unexpected token `do'
$ < <( echo foo ) xargs echo
foo
$ bash --version
GNU bash, version 5.1.4(1)-release (x86_64-apple-darwin20.2.0)
- fiddlerwoaroof 5y agoMaybe wrap the loop either with parentheses or braces?
- aaaaaaaaaaab 5y agoTried that, but nope :D I'll let you figure this one out once you get near a computer!