Sponsored Content
Full Discussion: if, else help!
Top Forums Shell Programming and Scripting if, else help! Post 302291828 by mehrdad68 on Thursday 26th of February 2009 11:33:30 AM
Old 02-26-2009
Computer if, else help!

Hi,
I've got the following script:

YEAR=`date '+%Y'`
MONTH=`date '+%m'`
DAY=`date '+%d'`
HOUR=`date '+%H'`
MINUTE=`date '+%M'`
LASTHOUR=$((HOUR-1))

What i like to do is:

if $LASTHOUR < 9 then
function1
else
function2

tnx
 
All times are GMT -4. The time now is 11:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy