Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在标准输出和日志文件上获得 curl 输出?
这将重定向到日志文件。
curl -o $OUTPUTFILE 2>>$LOGFILES $url
这将在标准输出上显示输出。
curl -o $OUTPUTFILE $url
您使用tee:
tee
curl -o $OUTPUTFILE $URL 2>&1 | tee $LOGFILE