HowTo: Bash For While Loop Through File Contents Script
Here is a basic script in bash for looping through the contents of a file using a while loop: #!/bin/bash # specify the file you want to read filename=”file.txt” # open the file using a file descriptor # the -r option is to read the file exec 3<&0 exec 0<$filename # while loop to read … Read more