Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatting data in a file

Status
Not open for further replies.

johnfm00

Technical User
Dec 1, 2003
12
0
0
AU
hi, can anyone tell me how I can get these two lists of output side by side in the same file ?


netstat -a | grep -i listen | awk '{print $4}'
*.telacom
*.evm
*.ssh
*.bdstrain

netstat -n | grep -i listen | awk '{print $4}'
*.7504
*.619
*.22
*.9008
 
man paste


vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
thanks you very much vlad, that worked a treat. I didn't know about paste, nice to learn a new trick.
 
Something like this ?
tmp=/tmp/$$
netstat -a | grep -i listen | awk '{print $4}' >$tmp.a
netstat -n | grep -i listen | awk '{print $4}' >$tmp.n
pr -m -t $tmp.?
rm -f $tmp.?


Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top