Extract text column in bash using awk pipe

By neokrates, written on September 3, 2010

awk   snippet

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 70 views
Rate it
Ad
Poll
  • Which CI tools are used in your enterprise?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext

Use form awk "{ print \$COL_1 \$COL_N }" :

user@host:~$ echo "1col 2col 3col 4col 5col" | awk "{ print \$3 \$5 }"
 
3col5col
Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: 0 (from 0 votes)
0 votes 'YES'  0 votes 'NO'
TAGS
RELATED
Pages
Posts
SOCIAL
Be Sociable, Share!

Leave a Reply