[Lubuntu] Sed substitution with partially duplicate results

John Hupp lubuntu at prpcompany.com
Wed Dec 19 19:28:11 UTC 2012

I'm using a script with sed to modify a configuration file. The script:

sed -i \
     -e 's/UPSCABLE usb/UPSCABLE ether/' \
     -e 's/UPSTYPE usb/UPSTYPE net/' \
     -e 's/DEVICE/DEVICE Lubuntu1:3551/' \
     -e 's/TIMEOUT 105/TIMEOUT 60/' \
     -e 's/NETSERVER on/NETSERVER off/' \
     -e 's/NISIP'

It all works fine except for this substitution:
-e 's/DEVICE/DEVICE Lubuntu1:3551/'

It takes this line:
and replaces it with this:
DEVICE Lubuntu1:3551 Lubuntu1:3551

Does anyone know why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/lubuntu-users/attachments/20121219/fc459b9d/attachment.html>

More information about the Lubuntu-users mailing list