Anything goes

random and perhaps useful information

Tuesday, July 19, 2011

Reverse the ordering of lines in a file

cat file | perl  -e 'print reverse <>'
Posted by tsengf at 1:52 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

2 comments:

Sujoy Kumar Das said...

just use `tac`

$ tac file

September 17, 2011 at 1:05 AM
tsengf said...

Nice. Thanks!

October 15, 2011 at 11:02 AM

Post a Comment

Newer Post Older Post Home
View mobile version
Subscribe to: Post Comments (Atom)

Search This Blog

Pages

  • Main blog
  • About this blog
  • Contact me

Popular Posts

  • DD-WRT on Belkin Share Max N300 (F7D7301)
  • DD-WRT client bridge mode
  • Installing SSH server in Cygwin on Windows 7
  • Install linux using PXE boot with tftp hosted on Windows
  • Configure bridge mode on the 2Wire 2701HG-B Gateway
  • How do I remove .nfs files?
  • Installing sendmail in Cygwin
  • Send Email from the command line in Ubuntu 11.10
  • Convert a space-separated string into array in Bash
  • Play youtube audio from the command line on Raspberry Pi

Labels

android bmw c car cygwin ddwrt emacs freshtomato gmail htpc libreelec linux network openwrt otg pihole pizero politics raspberrypi raspbian repair shopping technology usb utility windows wrt x1
Powered by Blogger.