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 0.0.0.0/NISIP 127.0.0.1/'
/etc/apcupsd/apcupsd.conf

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

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

Does anyone know why?
-- 
Lubuntu-users mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/lubuntu-users

Reply via email to