![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem with if, while, for conditions | kittusri9 | Shell Programming and Scripting | 3 | 04-24-2008 09:15 AM |
| multiple conditions in if/then | grandtheftander | UNIX for Dummies Questions & Answers | 4 | 07-21-2006 01:58 PM |
| if statement with two conditions | cin2000 | Shell Programming and Scripting | 1 | 01-23-2006 03:21 PM |
| if statement with two conditions -e, && | yongho | Shell Programming and Scripting | 16 | 06-14-2005 04:46 PM |
| multiple conditions in if statements | tim mauger | Shell Programming and Scripting | 3 | 04-28-2002 09:42 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
|
||||
|
What's "pbash"?
Code:
if [ "$VAR" = "Upper" ] || [ "$VAR" = "Lower" ]; then VAR=25 fi Code:
case $VAR in Upper|Lower) VAR=25;; esac |
|
||||
|
Typeo... just plain bash
![]() Thanks as always for the great replies. These forums and the contributing members are terrific! |
| Sponsored Links | ||
|
|