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 ]
|