curl 7.87.0 忽略 --output 参数

curl 7.87.0 忽略 --output 参数

当我打电话时

curl --output quarto.deb -L $(curl https://quarto.org/docs/download/_prerelease.json | grep -oP "(?<=\"download_url\":\s\")https.*${ARCH}\.deb")

输出是

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 26098  100 26098    0     0  33576      0 --:--:-- --:--:-- --:--:-- 33588
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 84.5M  100 84.5M    0     0   9.9M      0  0:00:08  0:00:08 --:--:-- 11.0M
Warning: Binary output can mess up your terminal. Use "--output -" to tell 
Warning: curl to output it to your terminal anyway, or consider "--output 
Warning: <FILE>" to save to a file.

为什么curl 忽略这个--output参数?如果我使用-O(大写 O),我会得到相同的结果。

我记得几个月前使用过相同的命令,但没有遇到这个问题。

答案1

curl https://quarto.org/docs/download/_prerelease.json | grep -oP "(?<=\"download_url\":\s\")https.*${ARCH}\.deb"

这会返回两个 url 并导致问题

相关内容