I want to do something like:
if [ CURRENT=$(stat -c %Y $STATUS_FILE) -ne $LASTUPDATE ]
then LASTUPDATE = $CURRENT
fi
开发者_如何学JAVA
That is... I want to assign a variable and do a comparison since I'll use that variable later
Absolutely.
$ echo "$foo"
$ echo "${foo=$(echo bar)}"
bar
$ echo "$foo"
bar
精彩评论