![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need your Help on Unix Shell Scripting......... | vinayraj | UNIX for Advanced & Expert Users | 5 | 02-08-2008 03:00 AM |
| Loop till you find a string in a fine <-- Need Help New to Unix Scripting | mrehman | UNIX for Dummies Questions & Answers | 1 | 01-30-2008 02:01 PM |
| Unix shell scripting to find latest file having timestamp embedded... | kaushik25 | AIX | 2 | 08-06-2007 07:42 PM |
| difference between AIX shell scripting and Unix shell scripting. | haroonec | Shell Programming and Scripting | 2 | 04-12-2006 05:12 AM |
| UNIX find by time scripting | budrito | UNIX for Advanced & Expert Users | 1 | 10-08-2004 02:19 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
How to find whenther given value is in betwwen min and Max in unix shell scripting
Hi
I wanted to write a shell script with an if condition Example MinValue=10 MaxValue=30 logvalue = some integer value that script reads from the command line arguement I wanted to check whether log value greater than or equal to10 and less than equal to 30 and proceed with the rest of hte code only if logValue is between or equal to the MinValue and MaxVlaue If condition should work like this in unix shell scripting if(MinValue<=logValue<=MaxValue) Thanks in advance for all the help |
| Forum Sponsor | ||
|
|
|
|||
|
Thanks for the solution
It worked I am just wondering whether the ; at the end of if (if [ ];then ) is necessary or notthe reason why I was asking is it worked with out ; and with ; so just wondering is there anything that I am missing if I don't keep the ; at the end of if Is there any difference between if [ ];then fi and if [ ] then fi Thanks in advance Pinky |