![]() |
|
|
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 |
| finding string at runtime | inderpunj | Shell Programming and Scripting | 1 | 05-01-2008 04:19 AM |
| While finding compare the result with given string | mr_bold | UNIX for Dummies Questions & Answers | 4 | 04-24-2008 10:31 PM |
| finding a string in a file | Ume1986 | UNIX for Advanced & Expert Users | 2 | 01-24-2008 07:19 AM |
| Finding part of a string | DAFNIX | Shell Programming and Scripting | 4 | 09-21-2006 12:24 AM |
| Finding a certain string on each line in a file | VODAFUN | Shell Programming and Scripting | 5 | 10-07-2005 06:48 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello folks
I have a text file abcd.txt and has a line starting with number '8'. I have a string in this line starting at position 'a' to position 'b' also this string is a number and have to be reduced by 1. there is also a problem that it has to be padded with zeros to make the string always with 6 characters. eg: abcd.txt content of this file: 1ahdhliehgoei 5abldflierjlijuero903489 034309842098 8000000020809832021090-34 the third line starting with 8 has to be changed. the string starts at position 4 to position 9. so 000002 has to be reduced by 1 and shown as 000001 and the output should look like this in the same abcd.txt file. 1ahdhliehgoei 5abldflierjlijuero903489 034309842098 8000000010809832021090-34 how can this be changed in shell scripting I would appreciate if someone can help me on this. Thanks in advance.... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|