curl progress - only show percentage

后端 未结 3 1079
耶瑟儿~
耶瑟儿~ 2021-02-01 06:35

Is there an option for the curl command to show only a percentage output to shell rather than all of this, for example:

  % Total    % Received % Xferd  Average          


        
相关标签:
3条回答
  • 2021-02-01 07:21

    Two modifiers might help, although neither are exact: --silent will suppress all updates and --progress-bar will show a progress bar only.

    Edit: One option to make things easier would be to make a wrapper using Expect to simplify the output to your shell script or whatever is listening to curl.

    0 讨论(0)
  • 2021-02-01 07:35

    You might want to try the -# option.

    It shows a simple progress bar and percentage downloaded.

    0 讨论(0)
  • 2021-02-01 07:39

    Does the parameter -# solve your problem?

    -#/--progress-bar

    Make curl display progress information as a progress bar instead of the default statistics.

    From here.

    0 讨论(0)
提交回复
热议问题