Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: perl one liner print columns 2.. last

by mhearse (Chaplain)
on Jan 04, 2013 at 19:37 UTC ( #1011709=note: print w/replies, xml ) Need Help??


in reply to perl one liner print columns 2.. last

awk does such things well. Uses \s+ delimiter by default.
cat file | awk '{ print ( $2, $(NF-1) ) }'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011709]
help
Chatterbox?
[LanX]: nope this one One day the triangle player of an orchestra gets very ill and goes to the hospital.. ..
[LanX]: don't go to Great Brexitan ... :)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2017-10-21 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (270 votes). Check out past polls.

    Notices?