シェルスクリプトでビジュアルにテキストボックスを使う
「bash on Windows10」でシェルスクリプトでビジュアルにテキストボックスを使うには、以下のコマンドを実行します
whiptail --title "Hello,whiptail!" --textbox test.txt 8 40
それでは実行してみましょう。まず、テキストボックスに表示するファイルを作成します。名前は「test.txt」、中身は「test」とします。以下のコマンドを実行します
echo "TEST" > test.txt
次に、以下のコマンドを実行します。
whiptail --title "Hello,whiptail!" --textbox test.txt 8 40