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

AWK question

Status
Not open for further replies.

santhas

Technical User
Aug 27, 2003
35
AU
Dear awk gurus,

I have an out put like this:
Min
8% 426 0 0
Avg
20% 0 0 968

I want them to be printed like this:

Min 8% 426 0 0
Avg 20% 0 0 968

Thanks
 
Something like this ?
Code:
awk 'NF==1{x=$1;getline;print x,$0}' /path/to/input >output

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top