reading /proc/cmdline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, all -

I use the following example of code in my kickstart file, to get values
from /proc/cmdline to use later on during the install:

if grep -i -q "mystring[a-zA-Z0-9]" /proc/cmdline
then
    MYSTRING=`cat /proc/cmdline | sed 's/.*mystring=\([^ ]*\).*/\1/'`
fi

I think Klaus in fact gave this to me.  However, I've ran into a few
problems.  It seems that this does not like strings with periods in
them, such as an IP address.

Since I know a bit less than nothing about regular expressions, I was
hoping that someone could give me a hand with this.  I need to modify it
to allow me to assign a dotted quad string to the MYSTRING variable.

Again, any help would be greatly appreciated.

Thanks!
-dant


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux