http://www.perlmonks.org?node_id=1011790


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

Thanks for all the timely and helpful replies! Even answers not actually solving the problem, are very educational. I should have provided more detail, this problem has stymied me many times in many situations, and I finally got frustrated enough to ask the question. (and got the answer(s)!) In this case I wanted to print history without the line numbers on lines that were whitespace separated and variable columns. Thanks to all again! These worked for me ...

history|perl -lane 'print join q{ }, @F[1..$#F]' perl -lane 'print join q{ }, @F[1..$#F]' /tmp/1.out