macos Catalina上的卷曲未显示响应体
试图用curl使一个curl变为,然后响应体从屏幕上消失。我从我的终端制作了一个gif: 我正在尝试运行此cmd,其中test是一个文本文件:macos Catalina上的卷曲未显示响应体,macos,curl,Macos,Curl,试图用curl使一个curl变为,然后响应体从屏幕上消失。我从我的终端制作了一个gif: 我正在尝试运行此cmd,其中test是一个文本文件: curl --upload-file test https://transfer.sh 对于解决方案,我使用了一个内联python脚本,它工作得非常好: python -c 'import requests; print(requests.post("https://transfer.sh/", files={"upload_file": open("
curl --upload-file test https://transfer.sh
对于解决方案,我使用了一个内联python脚本,它工作得非常好:
python -c 'import requests; print(requests.post("https://transfer.sh/", files={"upload_file": open("test","rb")}).text)'
curl
似乎在给终点站一个回车。尝试使用tr
剥离回车:
curl——上传文件测试https://transfer.sh |tr-d'\r'
可以用-w“\n”进行修复:
同样的行为。顺便问一下,你知道zsh是否会这样做吗?
curl --upload-file test -s -w "\n" https://transfer.sh