jump to navigation

shell script- date 13 三月, 2007

Posted by leterboy in Embedding System.
trackback

I want to write a shell script to set wireless LAN device!
After setting up the device, it should download a file.
Then change the file mode to executable.

Since downloading a file needs time,I will use two time flag to control.
The following is testing the command date

#!/bin/sh
time1=`date +%M`
time2=`date –date=’10 mins ago’ +%M`echo time1=$time1
echo time2=$time2

check if the file is download successfully

if test -e a.sh
then
echo “download success!"
else
echo “download failed!"
fi

powered by performancing firefox

留言»

No comments yet — be the first.

發表留言