On Mon, 19 Jul 2004 22:17:05 +0200, Morten Fjendbo wrote:
> --klip
>
> #check for difference (if different there will be some content in $DIFF)
> DIFF=`diff guarding.time.old guarding.time.new`
>
> if [ "$DIFF" == "" ]
> #no difference
> else
> #different version available
>
Hvorfor ikke vende det på hovedet? Du vil jo kun gøre noget, hvis DIFF
indeholder en værdi.
if [ "$DIFF" ] then
#different version
echo -e "Newer version available on server\n"
else
#no difference
echo -e "Found no newer version on server\n"
exit 1
fi
Alle linjer efter og inklusiv else kan udelades, hvis du ikke ønsker
output, når der ikke findes opdateringer.
--
Hilsen/Regards
Michael Rasmussen
Get my public GnuPG keys:
mir <at> datanom <dot> net
http://search.keyserver.net:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://search.keyserver.net:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
You will soon forget this.