[Ilugc] 1D1C - tac

  • From: tkdhanasekar@xxxxxxxxx (Dhana Sekar)
  • Date: Wed, 18 Sep 2013 21:22:24 +0530

command: tac
usage: concatenate and print files in reverse

syntax: $ tac [OPTION]... [FILE]...

examples:

1. To print options and help of this command

   $ tac --help

2. To print the file in reverse order with the last line first

   $ cat test.txt

   1 this line one
   2 this line two
   3 this line three
   4 this line four
   5 this line five

   $ tac test.txt

   5 this line five
   4 this line four
   3 this line three
   2 this line two
   1 this line one

regards,
dhanasekar

Other related posts: