Linux shell script read file line by line
The following are different ways of reading a txt file line by line in linux shell. To fun the following scripts, you should create a “test.txt” file under the same directory with your script. Method 1 Use file names as parameter to the shell script. readFile.sh #!/bin/bash while read line do name=$line echo “Text read … Read more