One thought on “Iterate a Text File in Bash

  1. Actually, this is how not to do it — it starts a useless cat process and needs to store the whole file in memory. The right way to do it goes like this:

    while read line
    do
    echo $line
    done < FILE.TXT

Leave a Reply

Your email address will not be published. Required fields are marked *