if statement help

Ray Parrish crp at cmc.net
Tue Sep 29 19:01:20 UTC 2009


nowDay=$(date +%A);
nowDate=$(date +%d%B%Y);
nowTime=$(date +%H:%M);
AMorPM=$(date +%H):
padsp espeak "$nowDay";
padsp espeak "$nowDate";
padsp espeak "$nowTime hours":
if [$AMorPM -lt 12]
then padsp espeak "AM";
else
        padsp espeak "PM";
fi

Can anyone tell me why this always says PM, even when %H returns values 
lower than 12???

Thanks for any help you can be.

Later, Ray Parrish

-- 
The Future of Technology.
http://www.rayslinks.com/The%20Future%20of%20Technology.html
Ray's Links, a variety of links to usefull things, and articles by Ray.
http://www.rayslinks.com
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.
http://www.writingsoftheschizophrenic.com





More information about the ubuntu-users mailing list