wget or curl from stdin

后端 未结 5 1631
青春惊慌失措
青春惊慌失措 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:19

    The effection way is to avoid using xargs, if download files in same web server.

    wget -q -N -i - << EOF
    http://sitename/dir1/file1
    http://sitename/dir2/file2
    http://sitename/dir3/file3
    EOF
    

提交回复
热议问题