由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
PDA版 - 发伊妹儿的刷屏 script on Linix
相关主题
[APP] Advanced Browser for webOS v1.1.2请教,TP browser的 问题
火鸡的失败软软其实就是一个两面派
我只对这个webkit-based browser感兴趣【求救】升级了win 8.1 Browser上不了网
献给苦苦刷屏的同学一个script我preorder的Kindle寄出来了
tp拿到手试了试谁收到了 HP SMB 的伊妹儿?
advanced browser is slow支付宝真是垃圾
TP的浏览器真的很差Yammer 是个什么鸟玩意?
advanced browser有一点很不爽IdeaTab Lynx 不错
相关话题的讨论汇总
话题: echo话题: mystr话题: mysubj话题: lynx话题: email
进入PDA版参与讨论
1 (共1页)
g***f
发帖数: 18
1
#!/bin/sh
#
#
# current web page for HP TouchPad Wi-Fi 16GB
webpage="http://www.shopping.hp.com/product/rts_tablet/rts_tablet/1/storefronts/FB355UA%2523ABA"
# check this string on the web page
mystr="Coming soon"
# email you when mystr disappears
# change this to your email address
myemail="a*[email protected]"
mysubj="HP Touchpad might be vailable Now!"
# sleep this amount of seconds before reshua
mysleep=30
while [ 1 ]
do
lynx -dump "$webpage" | grep "$mystr" > /dev/null
if [ $? -ne 0 ] ; then
# ring some bells
echo -e -n '\a'; sleep 1; echo -e -n '\a'; sleep 1; echo -e -n '\a'
echo "***** $mysubj *****"
# email you
echo "$webpage" | mail -s "$mysubj" "$myemail"
exit 0
fi
sleep $mysleep
done
s******b
发帖数: 653
2
有货以后显示"HP Touchpad Available Now"吗?
g***f
发帖数: 18
3
Note:
Depending on your system mail settings, the notification email might be filtered as spam by your email client, as the incoming email address
might be from domains like "localhost". So check your spam folder.
What I would suggest is, first run the script with "Coming soon" changed to something else, then you will get an email notification from your system, if the email is in spam folder, click "Not Spam". Now change mystr back to "Coming soon", and run the script again.
g***f
发帖数: 18
4
Likely but not certainly. This only checks for the disappearance of "Coming soon" on the web page... When that happens, your system will email you.

【在 s******b 的大作中提到】
: 有货以后显示"HP Touchpad Available Now"吗?
b******k
发帖数: 244
5
多谢lz
为什么我运行,说 lynx:command not found
g***f
发帖数: 18
6
try /usr/bin/lynx
if you don't have lynx, try other text browsers, such as links (replace lynx with it in the script). you can look up text browsers on your system by:
man -k browser
or you can just "yum install lynx" or "apt-get install lynx"

【在 b******k 的大作中提到】
: 多谢lz
: 为什么我运行,说 lynx:command not found

b******k
发帖数: 244
7
多谢lz,可以了
b******k
发帖数: 244
8
多问一句,送给多个email, 用逗号还是分号分隔啊?
g***f
发帖数: 18
9
逗号 should work, otherwise, "man mail"

【在 b******k 的大作中提到】
: 多问一句,送给多个email, 用逗号还是分号分隔啊?
b******k
发帖数: 244
10
lz好人,非常感谢
e**********y
发帖数: 128
11
nice code!

【在 g***f 的大作中提到】
: #!/bin/sh
: #
: #
: # current web page for HP TouchPad Wi-Fi 16GB
: webpage="http://www.shopping.hp.com/product/rts_tablet/rts_tablet/1/storefronts/FB355UA%2523ABA"
: # check this string on the web page
: mystr="Coming soon"
: # email you when mystr disappears
: # change this to your email address
: myemail="a*[email protected]"

1 (共1页)
进入PDA版参与讨论
相关主题
IdeaTab Lynx 不错tp拿到手试了试
这个概念还不错advanced browser is slow
Win 8板选Ivy Bridge还是Atom?TP的浏览器真的很差
Thinkpad Helix 国内发布,键盘评价一般啊advanced browser有一点很不爽
[APP] Advanced Browser for webOS v1.1.2请教,TP browser的 问题
火鸡的失败软软其实就是一个两面派
我只对这个webkit-based browser感兴趣【求救】升级了win 8.1 Browser上不了网
献给苦苦刷屏的同学一个script我preorder的Kindle寄出来了
相关话题的讨论汇总
话题: echo话题: mystr话题: mysubj话题: lynx话题: email