jvras
asked on
How to do this
I have a file like this
001 name_01
002 name_02
003 name_03
The output that I need from this file above is :
001 002 003
How do this in a shell command ? I prefer it to do it with sed or awk.
Thanks for help
jvras
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ecw is giving me the just answer.
Thanks
jvras
assume that your file name is: test.txt
type in:
cat test.txt | awk '{print $1} | tr "\012" " " > test.tmp
echo "" >> test.tmp
mv test.tmp test.txt
This should work for you.