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.
returnとから返されるコードexitは同じです。キーワードは異なるコンテキストで使用されているだけです (return関数とソーシングから戻るexitため、現在のシェルを終了するため)。
return
exit
それら自体は互いに干渉しませんが、引数のないexitorは、別のorステートメントreturnで指定されている可能性がある、前のコマンドの戻り値を使用します。exitreturn