How do you read a loop file in Unix?
Answer
Looping through the content of a file in Bash
Answer
Looping through the content of a file in Bash
- # Open vi Editor vi a_file. txt # Input the below lines Monday Tuesday Wednesday Thursday Friday Saturday Sunday # cat the file cat a_file. txt. …
- #!/bin/bash while read LINE do echo “$LINE” done < a_file. txt. …
- #!/bin/bash file=a_file. txt for i in `cat $file` do echo “$i” done.