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 -->
  #6 (permalink)  
Old 05-14-2004
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Try replacing
if [ $( ps -ef | grep wtrs | wc -l ) -gt "3" ]; then

with
if [ `ps -ef | grep wtrs | wc -l` -gt "3" ]; then

You're using the original Bourne shell, so try backquotes instead.

Or consider using #!/bin/ksh if it's installed and the original syntax above.

Peace
ZB
http://www.zazzybob.com