1
可能性の重複:
In the bash shell, what is “ 2>&1 ”?「2>&1」とはどういう意味ですか?
#echo "[+] Creating $count files"
_remount
create=$((time ./dirtest $testdir $count $size) 2>&1)
可能性の重複:
In the bash shell, what is “ 2>&1 ”?「2>&1」とはどういう意味ですか?
#echo "[+] Creating $count files"
_remount
create=$((time ./dirtest $testdir $count $size) 2>&1)
これは標準誤差記述子stderr
(2)標準出力記述子stdout
(1)にリダイレクトされることを意味します。 &
は、1
がファイル記述子ではなくファイル名として解釈されることに注意してください。
標準エラーを標準出力にリダイレクトします。このようにして、stderrに書き込まれた結果は変数に格納されます。
[この質問](http://stackoverflow.com/questions/818255/in-the-bash-shell-what-is-21)から、stderrをstdoutにリダイレクトします。 – simont