![]() |
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 |
| IF condition failing in a SSH script | rubionis | Shell Programming and Scripting | 9 | 11-21-2007 04:17 PM |
| script to check for a condition inside a file | kiran1112 | Shell Programming and Scripting | 11 | 03-21-2007 09:38 AM |
| need help with test condition in shell script | pieman8080 | Shell Programming and Scripting | 9 | 09-11-2006 05:20 PM |
| awk script to split a file based on the condition | superprogrammer | Shell Programming and Scripting | 12 | 06-14-2005 03:59 AM |
| OR'ing condition in script | vino | Shell Programming and Scripting | 9 | 04-21-2005 08:34 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Shell script - If---fi condition
Hi All,
My current if statement is like mentioned below. But there is posibility that plant value which are currently only two i.e. ESAP and VAL will be more. I do not want to add OR condition every time. Is there any way, I can use only one bracket and go on adding new values. something like this. if [ $PLANT eq ESAP VAL VAL1 VAL2......]. I am not aware of exact syntax. Could you please let me know. ================================ if [ $PLANT = ESAP -o $PLANT = VAL ] then do something else do something fi ================================ |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|