xml to xmlstarlet
This commit is contained in:
parent
2c6ffbee87
commit
3e60231636
@ -10,11 +10,11 @@ TIMECASH=$(( 60 * 60 * 5 )) # 5 minut
|
|||||||
|
|
||||||
|
|
||||||
NOW=$(date -u +%s)
|
NOW=$(date -u +%s)
|
||||||
LASTTIME=$(xml sel -t -v "/xml/entries/entry/time" $WXFILE )
|
LASTTIME=$(xmlstarlet sel -t -v "/xml/entries/entry/time" $WXFILE )
|
||||||
|
|
||||||
if (( $NOW - $TIMECASH > $LASTTIME +1 ))
|
if (( $NOW - $TIMECASH > $LASTTIME +1 ))
|
||||||
then
|
then
|
||||||
wget $WXAPRS -O $WXFILE
|
wget $WXAPRS -O $WXFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
xml sel -t -v "/xml/entries/entry/$NAMETAG" $WXFILE
|
xmlstarlet sel -t -v "/xml/entries/entry/$NAMETAG" $WXFILE
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user