![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CEP vs the hype cycle | iBot | Complex Event Processing RSS News | 0 | 02-05-2008 03:20 PM |
| For cycle | nagomes | Shell Programming and Scripting | 3 | 06-08-2007 02:48 AM |
| Stopping a command during the cycle | chapmana | UNIX for Dummies Questions & Answers | 7 | 11-25-2006 02:08 PM |
| shell cycle | mape | Shell Programming and Scripting | 2 | 07-14-2006 12:12 AM |
| Find wildcard .shtml files in wildcard directories and removing them- How's it done? | Neko | UNIX for Dummies Questions & Answers | 1 | 06-27-2001 06:06 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
wildcard in a if cycle
hello everybody,
I need help on putting a wildcard match inside an if condition (I'm using korn shell): if [ $MYSEL -ne [0-5] ] then echo ' ' echo ''$MYSEL' is not a correct option' echo ' ' else ..... i tried also #if -ne "`[0-5]`" and a lot of combinations of `"' but I didn't find the correct one...i want to match as condition all values differents from 0 to 6 numbers thanks a lot for the help Elio |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
if [[ $MYSEL -lt 0 || $MYSEL -gt 5 ]] then
echo "bad"
else
echo "good"
fi
|
|
#3
|
|||
|
|||
|
thanks a lot, you are my hero
|
|||
| Google The UNIX and Linux Forums |