V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
huhuhushan
V2EX  ›  分享发现

简单的跟踪某网页特定内容的 shell

  •  
  •   huhuhushan · 2016-03-12 11:50:48 +08:00 · 869 次点击
    这是一个创建于 2980 天前的主题,其中的信息可能已经有所发展或是发生改变。
    #!/bin/bash
    
    url="http://v2ex.com"
    want="好玩"
    wget "$url" -O contents
    if
        result=$(cat contents | ack -i "$want")
    then
        echo "$result" | mail -s "Notification" [email protected]
    else
        echo "nothing"
    fi
    
    1 条回复    2016-03-12 11:56:17 +08:00
    Strikeactor
        1
    Strikeactor  
       2016-03-12 11:56:17 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5534 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 08:18 · PVG 16:18 · LAX 01:18 · JFK 04:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.