reverse lines in a text file
change file from
foo
bar
baz
to
baz
bar
foo
Linux:
tac file.txt
BSD:
tail -r file.txt
参考:https://stackoverflow.com/questions/742466/how-can-i-reverse-the-order-of-lines-in-a-file
change file from
foo
bar
baz
to
baz
bar
foo
Linux:
tac file.txt
BSD:
tail -r file.txt
参考:https://stackoverflow.com/questions/742466/how-can-i-reverse-the-order-of-lines-in-a-file