I am trying to write a script in which there is a function that outputs the file line by line:
linePr (){ while read LINE; do echo $LINE; done < $1 } In this case, the name or path to the file is entered in the first parameter of the script. However, at startup, the following error appears:
./program: 6: ./program: cannot open : No such file The file exists and is properly formatted.
How to solve this problem?