curl与grep的使用

[root@nhserver1 ~]# curl -s www.163.com | grep hot_pop_js.js | sed 's/www.[[:digit:]]*.com/111/'
    pollUrl: "http://111/special/0077450P/hot_pop_js.js",
[root@nhserver1 ~]# curl -s www.163.com | grep hot_pop_js.js | sed 's/www.[[:digit:]]*.com/www.google.com/'
    pollUrl: "http://www.google.com/special/0077450P/hot_pop_js.js",


or

[root@nhserver1 ~]# curl -s www.163.com | grep hot_pop_js.js | sed 's/www..*.com/www.google.com/'
    pollUrl: "http://www.google.com/special/0077450P/hot_pop_js.js",

原文地址:https://www.cnblogs.com/nhlinkin/p/3629744.html