too many argument
hey guys i have a problem with while statement
i want to write shell script that give a number between 1-3444 from user and if user enter out of range number give error e.g number must between read -p "plz Enter Number " p while [ $p != [1-9] -o $p != [1-9][0-9] -o $p != [1-3][0-4][0-4][0-4] ] do read -p "plz Enter Valid Number" p done but this have an error in while statement ! two many argument who can help me ? |
Why can't you just test whether the value is greater than or equal to 1 and less than or equal to 3444? You might want to look at the Advanced Bash-Scripting Guide (specifically section 7.3).
Also, this would probably be better off in Programming, so I'm reporting it to be moved there. |
Quote:
and what about char !!! by this work i filter just numbers |
Then you need to tell us what exactly it is you want to do..
|
All times are GMT -5. The time now is 11:30 AM. |