-1

Is there a way to show data in a file in reverse order ? input file is:

string1
string2
string3

i would like it to be

string3
string2
string1

*don't want the data to be sorted.

Ziv Attia
  • 57
  • 7

1 Answers1

1

That's exactly what tac does.

tac - concatenate and print files in reverse

Just do

tac file
oguz ismail
  • 39,105
  • 12
  • 41
  • 62