I need to read my file line by line from the end. I tried tac but that works like cat and I want to access it line by line.
tac
cat
Is there a way to d
You can use tac... together with a while loop:
while
while IFS= read -r line do echo "line is: $line" done < <(tac file)
$ seq 5 > a $ while IFS= read -r line; do echo "line is: $line"; done < <(tac a) line is: 5 line is: 4 line is: 3 line is: 2 line is: 1