[kanchilug] 1D1C - tac

  • From: Dhana Sekar <tkdhanasekar@xxxxxxxxx>
  • To: ILUG-C <ilugc@xxxxxxxxxxxxx>, kanchilug@xxxxxxxxxxxxx
  • 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
Kanchilug Blog : http://kanchilug.wordpress.com

To subscribe/unsubscribe kanchilug mailing list : 
http://kanchilug.wordpress.com/join-mailing-list/

Other related posts: