I am looking for a way to print the line number of files my script is going through. I have found $LINENO
but when I do
echo 'Found foo in file' $(basename $foo) 'on line' $LINENO >> foo.csv
It prints the results "Found foo in file Foo on line 97 in the .csv
file. I would like it to print the line in the file it is looking at and not the line the script it is on. How can I echo the line number in the files?
if then
.