|
if [[ $(date +'%H') -lt 12 ]]; then
if [[ $(date '+%a') = Sat ]]; then
now=`TZ=CST+24 date +%Y-%m-%d`
nows=`TZ=CST+24 date +%Y-%m-%d` ;
else [[ $(date '+%a') = Sun ]]; then
now=`TZ=CST+48 date +%Y-%m-%d`
nows=`TZ=CST+48 date +%Y-%m-%d` ;
fi
now=`TZ=CST+24 date +%Y-%m-%d`
nows=`date +%Y-%m-%e`
echo $now
echo $nows ;
fi
then is not required first high lighted.
second hightlighted set of statements are exeucuted for every condition whether it is SAT or SUN ; Is this what you want ??
|