I have two variables:
dateTimeNow=$(date -d 'now' +"%Y/%m/%d %H:%M:%S")
tokenExpireDate=$(date -d 'now + 25 minutes' +"%Y/%m/%d %H:%M:%S")
I want to check if $tokenExpireDate <= than $dateTimeNow
Something like this
if [[ "${tokenExpireDate}" <= "${dateTimeNow}" ]]; then echo "hi"; fi
I got:
-bash: syntax error in conditional expression
-bash: syntax error near `"${dateTimeNow}"'