by entire-name · 5y ago · 0 comments
For documentation purposes, this is the exact thing I tried to run:
$ < <(echo hi) while read a; do echo "got $a"; done
-bash: syntax error near unexpected token `do'
$ while read a; do echo "got $a"; done < <(echo hi)
got hi
Maybe there is another way... $ zsh -c '< <(echo hi) while read a; do echo "got $a"; done'
got hi
My position isn't that it is a good reason to switch shells, but if you're using it anyway then it is an option.