[HPADM] Appending spaces to variable length records

From: Naylor, Jim (Jnaylor@Schnucks.com)
Date: Fri Feb 28 2003 - 14:18:49 EST


Good Day All,
I though I could figure this out but I seem to be having a mental block. I
also searched the archives for some help but was unsuccessful. I have a
file with variable length records. I need to pad each record with space to
equal 465 length record.

Example File:

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCC

First record has 30 "A's" . I need to add 435 spaces to the end of this
record.
Second Record has 65 "B's". I need to add 400 spaces to the end of this
record.
Third Record has 25 "C's". I need to add 440 spaces to the end of this
record.

And so on. I though I could do it with sed but I can't figure it out. Any
help would be greatly appreciated.

Thanks,
Jim Naylor
Unix Systems Administrator
Schnuck Markets, Inc.
* Direct: (314) 994-4784
*)) Cell: (314) 691-0186
* Fax : (314) 994-4684
* jnaylor@schnucks.com

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:26 EDT