Shell Script 詢問使用者 Yes/No


很多時寫 Shell Script 都需要使用者確認動作, 然後詢問 yes 或者 no, Shell Script 裡面可以這樣寫:

Bash 3.2 或以上版本可以這樣寫:

Bash 4.x 這樣寫:

One Response

  1. Gary 06 February 2018

Leave a Reply