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 -->
  #3 (permalink)  
Old 11-22-2008
rc7 rc7 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 4
Bash has a built-in operator -ne for integer comparison. I would re-write the code for checking number of argument as:
if [ $# -ne 2 ]; then