Extract text column in bash using awk pipe

By neokrates, written on September 6, 2010

Rate it
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
Ad
Poll
  • Which test frameworks do you use?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Most popular search terms:
Stats
    Since publication, this page was visited 123 time(s).

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

user@host:~$ echo "1col 2col 3col 4col 5col" | awk "{ print \$3 \$5 }"
 
3col5col
 
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
    nope :(
SOCIAL
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Blogosphere News
  • E-mail this story to a friend!
  • Furl
  • LinkArena
  • Live
  • MisterWong
  • Print this article!
  • StumbleUpon
  • Technorati
  • Webnews.de
  • YahooMyWeb

Leave a Reply