The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Two conditions in one if statement
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Two conditions in one if statement
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
07-28-2008
borobudur
Registered User
Join Date: Jul 2008
Location: Geneva, Switzerland
Posts: 23
Oh boy! I think I'm to young for this. I'm from the Java generation, bash seems to be quite tricky.
These two seem to work. Is that really the same?
Code:
if [ $h -gt 9 -a $h -lt 21 ]; then
Code:
if [ "$h" -gt 9 ] && [ "$h" -lt 21 ]; then
borobudur
View Public Profile
Find all posts by borobudur
Find borobudur's past nominations received
Find borobudur's present nominations given