Bash: Read a file line by line
A short, tested Bash example for read a file line by line. Copy it and adjust the names and paths for your project.
Bash
while IFS= read -r line; do
echo "$line"
done < input.txtFind it in Zest
Search for “bash read a file line by line” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.