代码之家  ›  专栏  ›  技术社区  ›  Peyman Mohamadpour

CURL7.76.0卷曲:未知--写出变量:'errormsg'

  •  0
  • Peyman Mohamadpour  · 技术社区  · 3 年前

    CURL版本: 7.76.0 .
    操作系统: MacOS

    这个 documentaition 说:

    -w, --write-out <format>
    

    错误消息 错误消息。(在7.75.0中添加)
    出口代码 传输的数字输出码。(在7.75.0中添加)
    一个错误 仅当传输返回非零错误时,才会显示其余输出(在7.75.0中添加)

    但在终端内部使用它们:

    curl -s -w "%{errormsg}\n%{exitcode}\n%{onerror}\n" "https://api.github.com/users/lambda" >> log.txt
    

    我得到:

    curl:未知--写出变量:'errormsg'
    curl:未知--写出变量:'exitcode'
    curl:未知--写出变量:'onerror'

    有人能解释一下吗?

    0 回复  |  直到 3 年前