i was thinking in way that before run my script , evaluate which operating system that
user use ubuntu or solaris , am using this because there is some differences
in command option in each OS such as sed ..
, i was trying the following :
sysEval=`grep "ubuntu" | uname -a`
if [ sysEval ]; then
.......some command
else ....... some command
fi
NOTE That my script will run only in ubuntu or solaris
seems not working !
I'd probably do something like this:
Instead of parsing
uname -a
a better idea would be parsing output ofcat /etc/*release*
.There is an environment variable: