B"H
On 8/7/06, Néstor <[EMAIL PROTECTED]> wrote:
Guys,

I am trying to substitute a 4 digit number follow by 2 digit and a 'W'
the number is 6750 and I want to change it 6754 but only where is
follow by another 2 digits and a'W'.  I am not able to get it.

Here is a quickie that worked for me (assuming the list is in a file):
sed -e "s/6750\([0-9][0-9]W\)/6754\1/g"  NAME_OF_FILE_HERE

To edit the file in place and create a backup:
sed -i~ -e "s/6750\([0-9][0-9]W\)/6754\1/g" NAME_OF_FILE_HERE

Menachem



In the first sample data I want to change the second ocurrence.

this is example data:
A67506441900675064WATER_STANDBY_CHARGE0000010001
16786441900675064WATER STANDBY CHARGE0000010001
16786442000675064WATER STANDBY CHARGE0000010001
16786442100675064WATER STANDBY CHARGE0000010001
16786442200675064WATER STANDBY CHARGE0000010001
16786442300675064WATER STANDBY CHARGE0000010001
16786442400675064WATER STANDBY CHARGE0000010001
16786442500675064WATER STANDBY CHARGE0000010001
16750442600675064WATER STANDBY CHARGE0000010001
16786442700675064WATER STANDBY CHARGE0000010001

Thanks,

Néstor :-)

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list



--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to