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!

Converting variable length to fixed 1

Status
Not open for further replies.

pjb

Programmer
May 1, 2001
148
US
I have a variable character string that can be from one to eight bytes long. I have to put this in file where the field is fixed length, eight long. How can I put this in the output record where it will be in a fixed length field, left justified and paddeed with spaces?
 
Take a look at the printf function in the awk man page.

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

Part and Inventory Search

Sponsor

Back
Top