![Share on Facebook Facebook](https://www.rootlinks.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/facebook.png)
![Share on Twitter twitter](https://www.rootlinks.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/twitter.png)
![Share by email mail](https://www.rootlinks.net/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/mail.png)
DOSバッチファイルで使用していた&ですが、改めて詳細を確認しようとしたところなかなか見つからず
あまり使われないのかな…以前どこかのサイトで見た記憶があるんだけど
で、やっと見つけたのでメモ
Batch files – Conditional execution
http://www.robvanderwoude.com/condexec.php
“条件付き実行”が正解かどうかわからないのですが取り敢えず直訳して表題としました。日本語でなんて言うんだろう?
- command1 & command2
- command1 && command2
- command1 || command2
コマンド1の成功・失敗に関わらず実行後にコマンド2を実行する
コマンド1の実行が成功したらコマンド2を実行する
コマンド1の実行が失敗したらコマンド2を実行する