![]() |
|
|
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 |
| Insert character in the line | swat | UNIX for Dummies Questions & Answers | 1 | 06-30-2009 12:12 PM |
| Need to search and replace based on character count | vijaykrc | Shell Programming and Scripting | 3 | 02-19-2009 01:48 PM |
| how to check and remove leading zeroes from the buffer using c program | amitpansuria | High Level Programming | 1 | 11-11-2008 12:24 PM |
| Add leading zeroes to numbers in a file | raidzero | Shell Programming and Scripting | 3 | 06-17-2008 12:06 PM |
| How to trim the leading zeroes in a Currency field ? | Amruta Pitkar | Shell Programming and Scripting | 22 | 05-29-2007 05:45 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
insert leading zeroes based on the character count
Hi,
I need add leading zeroes to a field in a file based on the character count. The field can be of 1 character to 6 character length. I need to make the field 14bytes. eg: 8351,20,1 8351,234,6 8351,2,0 8351,1234,2 8351,123456,1 8351,12345,2 This should become. 8351,00000000000020,1 8351,00000000000234,6 8351,00000000000002,0 8351,00000000001234,2 8351,00000000123456,1 8351,00000000012345,2 Any help will be much appreciated. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|