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!

Awk help 1

Status
Not open for further replies.

driddickemc

IS-IT--Management
May 3, 2004
42
0
0
US
Looking to parse a file.. excel.. looks like..

data 10000
20000

data2 30000
40000

I need output to be as such..

data 10000 20000
data2 30000 40000

Please help not scripting guru :)
 
You really want to parse an EXCEL file with AWK ????

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I copy it into a text file.. so that's what the text file looks like..
 
A starting point:
awk 'NF==2{if(NR>1)print x;x=$1" "$2;next}NF{x=x" "$1}END{print x}' /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