如何重定向嵌套的linux命令输出

如何重定向嵌套的linux命令输出,linux,command-line,Linux,Command Line,我有点想实现这样的目标: time(curl-s$url>/dev/null)>>out.txt 当curl输出将被删除并且我保存时间的输出时,请尝试以下操作: { time curl -s &url ;} 2>> out.txt curl提供指定输出的选项: -o, --output <file> Write output to <file> instead of stdout. If you are using {} o

我有点想实现这样的目标:
time(curl-s$url>/dev/null)>>out.txt

curl输出将被删除并且我保存时间的输出时,请尝试以下操作:

{ time curl -s &url ;} 2>> out.txt

curl
提供指定输出的选项:

   -o, --output <file>
          Write output to <file> instead of stdout. If you are using {} or
          [] to fetch multiple documents, you can use '#'  followed  by  a
          number  in  the <file> specifier. That variable will be replaced
          with the current string for the URL being fetched. Like in:

请注意>>不会重定向错误流,而是时间写入错误流。
time curl -s $url -o /dev/null >> out.txt