April 2018
Beginner
284 pages
7h 3m
English
The read command is not only used to read inputs from the user; you can use the read command to read files for further processing.
#!/bin/bashwhile read linedoecho $linedone < yourfile.txt
We redirect the file content to the while command to read the content using the read command, line by line.
Finally, we print the line using the echo command.
Read now
Unlock full access