Reputation: 32081
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 do a comparison since I'll use that variable later
Upvotes: 8
Views: 3549
Reputation: 799150
Absolutely.
$ echo "$foo"
$ echo "${foo=$(echo bar)}"
bar
$ echo "$foo"
bar
Upvotes: 10