The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #1 (permalink)  
Old 09-19-2008
audiophile audiophile is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 27
if then statements with two conditions...?

Is it possible to setup two conditions for an if then statement in a pbash script?

For example, depending on the text value of a variable I parse out of an xml file, I want to assign it a numerical values.

Example:

Code:
if [ "$VAR" = "Upper" ]; then
VAR="25"
fi

if [ "$VAR" = "Lower" ]; then
VAR="25"
fi
Can these two statements be replaced with a single one?