[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Omaha.pm] perl instead of cut -f 2,3,1
Hi David,
As you discovered,
cut -f 2,3,1 inputfile.txt
Actually gives you columns 1,2,3. cut ignores resorting requests. (boo!)
Perl field numbering starts at zero instead of one. This should give you want you wanted:
perl -anE 'say join "\t", @F[1,2,0]' inputfile.txt
Cheers,
Jay Hannah
Project Lead / Programmer
http://www.iinteractive.com
Email: jay.hannah@iinteractive.com
AOL IM: deafferret
Mobile: 1.402.598.7782
Fax: 1.402.691.9496