![]() |
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 |
| 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need your Help on Unix Shell Scripting......... | vinayraj | UNIX for Advanced & Expert Users | 5 | 02-08-2008 07: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 06:01 PM |
| Unix shell scripting to find latest file having timestamp embedded... | kaushik25 | AIX | 2 | 08-06-2007 10:42 PM |
| difference between AIX shell scripting and Unix shell scripting. | haroonec | Shell Programming and Scripting | 2 | 04-12-2006 08:12 AM |
| UNIX find by time scripting | budrito | UNIX for Advanced & Expert Users | 1 | 10-08-2004 05:19 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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 |
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|