Sometimes, You want to read the file content with bash programming.
There are multiple ways we can do
How to read a file by line in bash shell?
- using while loop
#!/bin/bash
while IFS= read -r line; do
echo "$line"
done <filename.txt
How to loop contents of a file in Bash Shell scripting tutorials and programming examples.
Sometimes, You want to read the file content with bash programming.
There are multiple ways we can do
#!/bin/bash
while IFS= read -r line; do
echo "$line"
done <filename.txt