awk
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > awk




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    awk  
James


Report This Message To A Moderator Edit/Delete Message


 
09-23-05 12:50 PM

grep Glen ~/Check| awk -F " " "{ print $1 }"

I have a file filled with name separated by spaces how can i edit the line
above to split by space







[ Post a follow-up to this message ]



    Re: awk  
shakahshakah@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-05 12:50 PM

James wrote:
> grep Glen ~/Check| awk -F " " "{ print $1 }"
>
> I have a file filled with name separated by spaces how can i edit the line
> above to split by space

Not sure I read your question correctly, but how about something like:

jc@soyuz:/tmp$ awk 'BEGIN { FS=" " } { print $2 "," $1 }' << EOT
> John Glenn
> Buzz Aldrin
> EOT
Glenn,John
Aldrin,Buzz
jc@soyuz/tmp$

?






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:48 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register