huhuhushan

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

  •  
  •   huhuhushan · Mar 12, 2016 · 1275 views
    This topic created in 3784 days ago, the information mentioned may be changed or developed.
    #!/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 replies    2016-03-12 11:56:17 +08:00
    Strikeactor
        1
    Strikeactor  
       Mar 12, 2016
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1376 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:20 · PVG 01:20 · LAX 10:20 · JFK 13:20
    ♥ Do have faith in what you're doing.