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-02-2007
kahuna's Avatar
kahuna kahuna is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 149
Quote:
Originally Posted by hitmansilentass
there are too many 'or' (||) conditions which i want to reduce so that it looks better
It's not clear what you mean by "looks better". Exactly what would "look better" look like? Assuming your variables do not contain whitespace, another alternative without || might be

Code:
if [[ `echo $XXXX $YYYYY $TTTT $NNNN $QQQQ |wc -w` -ne 5 ]]; then
whatever
fi