The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
IF statement question
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
IF statement question
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
02-02-2007
hcclnoodles
Registered User
Join Date: Mar 2002
Posts: 272
IF statement question
Hi there
We have boxes named server-sybase2, server-oracle1, etc etc
Does any body know how I can construct an if statement to say, if the hostname of the box contains the string "sybase" then do X ie
Code:
if [ `hostname` contains the string "sybase"] then X fi
any help would be greatly appreciated
hcclnoodles
View Public Profile
Find all posts by hcclnoodles
Find hcclnoodles's past nominations received
Find hcclnoodles's present nominations given