I have the following script:
#!/bin/bash
LINE="linux /disk0/vmlinuz rw root=/dev/mapper/VolGroup1-disk0_root console=tty0 clock=pit aacraid.msi=1"
NEW_LINE="linux /disk0/vmlinuz rw root=/dev/mapper/VolGroup1-disk0_root console=tty0 clock=pit aacraid.msi=1 elevator=deadline"
#sed -i "/${LINE}/c ${NEW_LINE}" grub.cfg
LINE1="insmod lvm"
NEW_LINE1="insmod lvm x"
sed -i "/${LINE1}/c ${NEW_LINE1}" grub.cfg
Can someone tell me why the commented sed does not work (Error: sed: -e expression #1, char 10: extra characters after command), but the uncommented one does, when only the strings are different?

