Software >> OS >> Unix >> Shell >> bash >> How to perform different shell command depending on whether it is Solaris or Linux


if [ `uname -s` = SunOS]

then

     # run solaris commands here

fi

if [ `uname -s` = Linux]

   # run linux commands here

fi