LoginSignup
1
1

More than 5 years have passed since last update.

シェルスクリプトでユーザ入力により分岐する場合

Posted at

1.readを利用してユーザ入力を読み込み
 e.g read ACTION
2.case文を利用して入力内容に対する処理を分岐
e.g
case ${ACTION} in
1)
処理1
;;
2)
処理2
;;
esac

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1