Iām trying to find out if there are two days. Below is code that works great on UNIX.
date1=$(date "+%m/%d/%y")
temp1=4/8/24
echo $((($(date -u -d $temp1 +%s) - $(date -u -d $date1 +%s)) / 86400))
When I execute on a script in an AIX field, I get below the error:
date: unrecognized flag: d
Usage: date [-u] [+ "Field Descriptors"]
date: unrecognized flag: d
Usage: date [-u] [+ "Field Descriptors"]
(-) / 86400: syntax error: expected operand (error token ") / 86400") `
This is PROD env, and I do not have administrator access to install any packages on it.
user0 source
share