Filter curl header output in verbose mode

curlgrep

Using curl -v ..., i.e. the verbose mode that prints out the input and output headers. However, this info is not piped and I can not grep-out lines which I dont need.

How can you filter curl header output?

Best Answer

The header output from curl is gets printed to standard error. So you have to use redirection, for example grepping out the Content-Length header:

curl -v google.com 2>&1 | grep -vi content-length
Related Question