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.