wget or curl from stdin

后端 未结 5 1610
青春惊慌失措
青春惊慌失措 2020-12-30 03:20

I\'d like to download a web pages while supplying URLs from stdin. Essentially one process continuously produces URLs to stdout/file and I want to pipe them to wget or curl.

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 04:16

    Use xargs which converts stdin to argument.

    tail 1.log | xargs -L 1 wget
    

提交回复
热议问题