SyntaxFix
Write A Post
Hire A Developer
Questions
In my eyes the best way to read from stdin in bash is the following one, which also lets you work on the lines before the input ends:
while read LINE; do echo $LINE done < /dev/stdin