Bash – Loop over the contents of a file line by line

If you need to iterate over the content of a file line by line
You can use this little bash trick.

In this case , it will simply print the line, but if you need to do an operation on the text , just insert your code into the while loop.

Leave a Comment

Your email address will not be published. Required fields are marked *