if [ $UNITS = day ]; then
while ((OFFSET > 0)); do
if (( OFFSET >= day )) ;then
month=$((month - 1))
if (( month == 0 )) ;then
year=$((year - 1))
month=12
fi
set -A days `cal $month $year`
OFFSET=$((OFFSET - day))
day=${days[$(( ${#days[*]}-1 ))]}
else
day=$((day - OFFSET))
OFFSET=0
fi
done
The above code patch is running fine in AIX but when I am trying to run the same in Linux I am getting the below error:
set: -A: invalid option
set: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
set -Ais even deprecated inkshnowadays. looks likebashbased on theBHCPstuff. dodays=($(cal $month $year))set -Ais deprecated.setwas deprecated syntax because korn intends typeset to handle all of that.