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 -->
#
1
(
permalink
)
07-28-2008
borobudur
Registered User
Join Date: Jul 2008
Location: Geneva, Switzerland
Posts: 23
Two conditions in one if statement
I'm totally new with bash programming and I don't get it how to put two conditions in one if statement. My code looks like this:
Code:
h=`date +%k` if [ [ $((h>9)) ] && [ $((h<21)) ] ]; then
$h is 10 but I don't get into my if statement. What's wrong here?
borobudur
View Public Profile
Find all posts by borobudur
Find borobudur's past nominations received
Find borobudur's present nominations given