bash read line by line from variable code example Example: bash while read line loop from variable while read -r line do echo "line=[$line]" done < <(cat jj)