SyntaxFix
Write A Post
Hire A Developer
Questions
Your first attempt was close. Here is the simplistic approach using your idea.
file="somefileondisk" lines=`cat $file` for line in $lines; do echo "$line" done