dear all
i want to read 5th no of line from last line of file.
kindly suggest me possible ways.
rgds
jaydeep
dear all
i want to read 5th no of line from last line of file.
kindly suggest me possible ways.
rgds
jaydeep
you can use the below..
tail -5 <FILENAME> | head -1
For Example
$ cat testfile.txt
1
2
3
4
5
6
7
8
9
0
$ tail -5 testfile.txt |head -1
6
Or in case you really mean read the lines in reverse order like the topic title says, look at the tac command.