append to a line
stuart at sjsears.com
Fri Feb 15 21:48:52 UTC 2008
Tom Brown wrote:
>>> I need to append some options to the kernel line in grub.conf and i
>>> wonder can anyone tell me the tool i can use to stick 'some stuff' on
>>> the end of a line?
>> vi is my favorite tool for this. (#vi /boot/grub/grub.conf)
> ah yes - sorry should have said this needs to be scriptable!
how many machines do you want to do this to?
/me prefers sed for this, but there are any number of options
sed -i.backup 's,kernel.*$,& arg1 arg2 arg3,' /boot/grub/grub.conf
More information about the fedora-list