「Transwiki:Bash Shell Scripting」の版間の差分

削除された内容 追加された内容
Fu7mu4 (トーク | 投稿記録)
Fu7mu4 (トーク | 投稿記録)
725 行
表示内容: <pre>subshell succeeded&#xA;subshell failed</pre>
 
スクリプト全体の場合、最後に実行したコマンドの終了値をこの<tt>exit</tt>が返す終了値のデフォルトにするのと同様に、明示的に<tt>exit</tt>で値を指定しなかったサブシェルの場合、<tt>exit</tt>が返すデフォルトは最後に実行したコマンドの終了値になります。
Like in a script as a whole, <tt>exit</tt> defaults to returning the exit status of the last-run command, and a subshell that does not have an explicit <tt>exit</tt> statement will return the exit status of the last-run command.
 
===環境変数===