From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,5562e7cbf2805bb0,start X-Google-Attributes: gidf8c9b,public X-Google-Thread: 1012a6,5562e7cbf2805bb0,start X-Google-Attributes: gid1012a6,public X-Google-Thread: fee84,5562e7cbf2805bb0,start X-Google-Attributes: gidfee84,public From: wli@cincom.com Subject: Need to format text records from a hugh file Date: 1999/06/28 Message-ID: <7l73lr$8fl$1@nnrp1.deja.com>#1/1 X-Deja-AN: 494656304 X-Http-Proxy: 1.0 http://yar.cincom.com, 1.0 x33.deja.com:80 (Squid/1.1.22) for client 198.8.67.3 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Mon Jun 28 06:11:12 1999 GMT Newsgroups: comp.unix.osf.osf1,comp.unix.questions,comp.unix.shell X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Hi, I wonder if someone can help me on the following problem. I have an export file with 4 fields in each record i.e. AAAAAAA ; BBBBBBBBB ; C ; DDD AAAA ; BBBBBB ; CCCCCC ; D and I need to reformat the records by removing the ";" with the following condition 1. A field starts from 1st col. to 7th col. 2. B field starts from 8th col. to 34th col. 3. C field starts from 35th col. to 55th col. 4. D field starts from 55th col. to 60th col. If the text is less that the length of field, space (from space bar) will be appended to the end of that field. Is there a simple way that I can do it with "vi" or is there any tools or script that I can do that? The file has 200000 records and I just can't afford to change them one by one and I need it quite urgent. Thanks in advanced for any help. William Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.