reverse the lines?# Unix - 噫吁兮,危乎高哉
c*o
1 楼
Suppose we want to reverse the lines in a file, say the original file looks
like this:
line 1
line 2
line 3
we now want to get a new file like this:
line 3
line 2
line 1
How will you do it? Either shell or perl is ok. Just notice that this file
could have many many lines.
Thanks,
like this:
line 1
line 2
line 3
we now want to get a new file like this:
line 3
line 2
line 1
How will you do it? Either shell or perl is ok. Just notice that this file
could have many many lines.
Thanks,