syntax error: operand expected (error token is "- ")

2.3k views Asked by At

Could anyone point out what's wrong with the below line from a bash script I'm using?

if [ "$(( $(date +"%s")-$(stat -c "%Y" $SENDDIR/$NIGHTLY_FILE) ))" -gt "3600" ]; then

I receive the error noted in the subject line.

I had copied the script from one server to another thinking that it should work but alas, no.

0

There are 0 answers