The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
How can i check for a day
.
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
:
How can i check for a day
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
06-24-2005
RishiPahuja
Registered User
Join Date: Apr 2005
Location: Bangalore, India
Posts: 203
Use
if [[ $(date '+%a') = Sat ]]; then
now=saturday
echo $now
else
now=notsaturday
echo $now
fi
Note: -eq is meant for numeric comaprisions.
RishiPahuja
View Public Profile
Find all posts by RishiPahuja
Find RishiPahuja's past nominations received
Find RishiPahuja's present nominations given