linux - Shell Script for removing craskernel -


how can remove crashkernel parameter , attached value grub.conf ?

title rhelos (3.6.18-274)         root (hd0,0)         kernel /vmlinuz-3.6.18-274 ro root=label=/ nmi_watchdog=1 crashkernel=64m@16m rhgb quiet console=tty12 loglevel=1         initrd /initrd-3.6.18-274.img 

to

    title rhelos (3.6.18-274)         root (hd0,0)         kernel /vmlinuz-3.6.18-274 ro root=label=/ nmi_watchdog=1 rhgb quiet           console=tty12 loglevel=1         initrd /initrd-3.6.18-274.img 

tried awk method deletes entire line.

just parameter crashkernel , not entire line.

thanks !

using sed:

sed -i 's/crashkernel=[0-9@m]*[ ]*//' gryb.conf 

or,

sed -i 's/crashkernel=[^ ]*[ ]*//' gryb.conf 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -