How do I pipe or redirect the output of curl -v?

后端 未结 8 1793
挽巷
挽巷 2021-01-29 21:17

For some reason the output always gets printed to the terminal, regardless of whether I redirect it via 2> or > or |. Is there a way to get around this? Why is this happening?

8条回答
  •  执念已碎
    2021-01-29 22:05

    Your URL probably has ampersands in it. I had this problem, too, and I realized that my URL was full of ampersands (from CGI variables being passed) and so everything was getting sent to background in a weird way and thus not redirecting properly. If you put quotes around the URL it will fix it.

提交回复
热议问题