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 09-19-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
What's "pbash"?

Code:
if [ "$VAR" = "Upper" ] || [ "$VAR" = "Lower" ]; then
  VAR=25
fi
Modern POSIX shells have a richer set of conditionals using [[ conditions ]], or you can use case:

Code:
case $VAR in Upper|Lower) VAR=25;; esac