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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 05-14-2004
LordJezo LordJezo is offline
Registered User
 

Join Date: May 2004
Posts: 45
Quote:
Originally posted by zazzybob
Use wc -l to count the lines of the output

i.e.
Code:
if [ $( ps -ef | grep wtrs | wc -l ) -gt "3" ];
then
   # do stuff for more than 3 lines
else
   # do stuff for three or less lines
fi
What's the -gt "3" bit mean?
Reply With Quote