wget without any headers

后端 未结 2 939
情深已故
情深已故 2021-01-24 00:33

I would like to get the files without headers. I have tried many things like

wget --header=\"\" http://xxxxx.xxxxxx.xx

How can I get any files

2条回答
  •  轮回少年
    2021-01-24 01:25

    Could you assign the output of wget to a string, then use something else to process it to drop headers (or parse them out of the text), such as

    w1=$(wget --quiet --output-document - www.example.com)
    echo $w1 | grep --only-matching ".*"
    

    giving (adding newlines to display nicely here):

     

    Example Domain

    This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission.

    More information...

提交回复
热议问题