Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
can someone help? I'm trying to create a one liner that will split a file into columns and print the 2nd through the last column. sort of like this (doesn't work) Appreciate any help
cat /tmp/1.out|perl -lane 'print $F[1]..$F[-1]'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl one liner print columns 2.. last
by eyepopslikeamosquito (Archbishop) on Jan 04, 2013 at 23:34 UTC | |
by Jim (Curate) on Jan 06, 2013 at 17:23 UTC | |
|
Re: perl one liner print columns 2.. last
by aguilarsoto (Novice) on Jan 04, 2013 at 19:10 UTC | |
|
Re: perl one liner print columns 2.. last
by Jim (Curate) on Jan 04, 2013 at 22:03 UTC | |
|
Re: perl one liner print columns 2.. last
by mhearse (Chaplain) on Jan 04, 2013 at 19:37 UTC | |
|
Re: perl one liner print columns 2.. last
by dbuckhal (Chaplain) on Jan 04, 2013 at 19:06 UTC | |
|
Re: perl one liner print columns 2.. last
by philipbailey (Curate) on Jan 04, 2013 at 19:03 UTC | |
by LanX (Saint) on Jan 04, 2013 at 19:24 UTC | |
|
Re: perl one liner print columns 2.. last
by Anonymous Monk on Jan 05, 2013 at 14:22 UTC | |
by Jim (Curate) on Jan 06, 2013 at 17:14 UTC |