how does bash read work with files passed in stdio code example Example: bash for stdin while read line ; do echo "$line" ; done < "${1:-/dev/stdin}"