bash:在管道中回显curl命令的输出

bash:在管道中回显curl命令的输出,bash,Bash,我尝试在管道中回显旋度的输出: 我试过了 但它们都不起作用。我做错了什么?使用tee而不是echo curl -s --fail --compressed -u $CREDS -X GET URL | tee - | jq -S "." > file.txt 手册页: 名字 tee-从标准输入读取并写入标准输出和文件 概要 T形三通[选项]。。。[文件] 描述 将标准输入复制到每个文件,也复制到标准输出 -a, --append append to the g

我尝试在管道中回显旋度的输出: 我试过了


但它们都不起作用。我做错了什么?

使用
tee
而不是
echo

curl -s --fail --compressed -u $CREDS -X GET URL | tee - | jq -S "." > file.txt

手册页:

名字 tee-从标准输入读取并写入标准输出和文件

概要 T形三通[选项]。。。[文件]

描述 将标准输入复制到每个文件,也复制到标准输出

   -a, --append
          append to the given FILEs, do not overwrite

   -i, --ignore-interrupts
          ignore interrupt signals

   If a FILE is -, copy again to standard output.

移除
| echo
零件。“不工作”不是一个问题描述。请包括示例输入、示例和预期输出。谢谢,但现在我得到了:解析错误:无效字符串:从U+0000到U+001F的控制字符必须在第19行第3列T:-:I/O处转义error@mealesbia除非
curl…|jq-S.“
未能引发相同的错误,这是一个无关的问题。
   -a, --append
          append to the given FILEs, do not overwrite

   -i, --ignore-interrupts
          ignore interrupt signals

   If a FILE is -, copy again to standard output.