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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick question about listing

Status
Not open for further replies.

hokky

Technical User
Nov 9, 2006
170
AU
Hi guys,

I've got file content like this
5.6G f320652
2.3G m023569

And I want to put the user name in the third field, which i need to finger it first.

So if I do,

for file in `cat filename`
do
echo $file
done

the result would be
5.6G
f320652
2.3G
m023569

How if I want to keep
5.6G ... in one line

And any idea the best way and shortest way of doing it ?

Thx guys,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top