Sometimes, You want to read the file content with bash programming.

There are multiple ways we can do

How to read and loop contents of a file in bash shell?

using while loop

while IFS= read -r line; do echo “$line” done <file