I want to do something like:
if [ CURRENT=$(stat -c %Y $STATUS_FILE) -ne $LASTUPDATE ] then LASTUPDATE = $CURRENT fi
That is ... I want to assign a variable and perform a comparison, since I will use this variable later
That's right.
$ echo "$foo" $ echo "${foo=$(echo bar)}" bar $ echo "$foo" bar