Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

awk one liner to print to end of line

$
0
0
Given:

Code:

1,2,whatever,a,940,sot
how can i print from one particular field to the end of line?

Code:

awk -F"," '{print $2 - endofline}'
the delimiter just happens to be a comma "," in this case. in other cases, it could be hypens:

Code:

1---2---whatever---a---940---sot

Viewing all articles
Browse latest Browse all 16232

Trending Articles