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

awk did not transform first line

Status
Not open for further replies.

brojard

IS-IT--Management
Jul 18, 2007
1
US
awk '{ FIELDWIDTHS = "8 4 10 12 32 20 15 10 2"; OFS="~"; print $1,$2,$3,$4,$5,$6,$7,$8,$9 }' infile.txt> outfile.txt

goal was to insert ~ as a delimiter on a fixed width file
where i defined the field widths. This worked great except, for some reason it did not operate on the first line. Can someone tell me what I did wrong?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top