FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-15-2008, 08:48 PM
Stuart Sears
 
Default append to a line

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


Stuart

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 02-15-2008, 08:50 PM
Dave Ihnat
 
Default append to a line

On Fri, Feb 15, 2008 at 09:42:33PM +0000, Tom Brown wrote:
> ah yes - sorry should have said this needs to be scriptable!

Then 'sed' is your tool.
--
Dave Ihnat
dihnat@dminet.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 02-16-2008, 10:12 AM
Chris G
 
Default append to a line

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

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 03:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org