Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 在 bash shell 中,“ 2>&1 ”是什么?
#echo "[+] Creating $count files" _remount create=$((time ./dirtest $testdir $count $size) 2>&1)
这意味着标准错误描述符stderr(2)将被重定向到标准输出描述符stdout(1)。请注意,&确保将1解释为文件描述符而不是文件名。
stderr
stdout
&
1
它将标准错误重定向到标准输出。这样,写入 stderr 的结果将存储在变量中。