![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fill the Key fields : Please help us | charandevu | Shell Programming and Scripting | 11 | 04-08-2008 10:40 AM |
| Find fields with no spaces in value | alfredo123 | UNIX for Dummies Questions & Answers | 10 | 04-18-2007 07:14 PM |
| How can i remove spaces in between the fields in a file | dsravan | Shell Programming and Scripting | 3 | 09-26-2006 05:11 PM |
| Align Text from a file. | earlepps | UNIX for Dummies Questions & Answers | 9 | 08-01-2006 09:37 AM |
| Delete spaces in between fields | guiguy | Shell Programming and Scripting | 12 | 03-31-2006 10:38 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
align several fields and fill spaces with zero
hi all,
i have a big problem, and i donīt know what to do. i have a flat file with several fields, which are separated by ";" like this: 5656838-7B;97030000-7;*;V16106133 ;1;1; 4612062-0B;97030000-7;*;C14038149 ;1;2; 8044938-0B;97030000-7;*;V16034219 ;1;2; where B is a blank space. each line is a record, and all have the same length. and each field has its determinated length. Example: field1[10],field2[10],field3[1], field4[1],field5[8], ... what i need, is align the content of the field 1 and 2 to the rigth, and put a zero to its left, like this: 05656838-7;97030000-7;*;V16106133 ;1;1; 04612062-0;97030000-7;*;C14038149 ;1;2; 08044938-0;97030000-7;*;V16034219 ;1;2; is that possible?? please, any idea thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|