On Fri, Feb 15, 2008 at 09:48:52PM +0000, Stuart Sears wrote: > 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? > >>> > >>> thanks > >>> > >> vi is my favorite tool for this. (#vi /boot/grub/grub.conf) > >> > > > > ah yes - sorry should have said this needs to be scriptable! > > examples? > 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 > > ... or for slightly more complex situations use awk. -- Chris Green