The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 02-02-2007
sb008 sb008 is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 384
if [ `hostname | grep sybase > /dev/null 2>&1; echo $?` -eq 0 ]
then
do_sybase_stuff
fi

f [ `hostname | grep oracle > /dev/null 2>&1; echo $?` -eq 0 ]
then
do_oracle_stuff
fi

f [ `hostname | egrep "oracle|sybase" > /dev/null 2>&1; echo $?` -eq 0 ]
then
do_ommon_oracle-sybase_stuff
fi