1
exitstatusをwhiptailmsgbox
から上書きすることはできますか?デフォルトでは、OKボタンを押すとウィッペイルアプリケーションが存在します。msgboxからのホイップエンプスexitstatusを上書きする
#! /bin/bash
OPTION=$(whiptail --title "Configuration Menu" --menu "Choose an option" 40 78 30 \ "1" "Return to main menu." \ "2" "Show current configuration." \ "3" "Enter Neo Serial Number." \ "4" "Change Neo IP Address." \ "5" "Change Neo Gateway." 3>&1 1>&2 2>&3)
exitstatus=$?
case "$OPTION" in 2)
whiptail --title "Current Configuration" --msgbox "Your current Neo configuration \n
IP Address: `ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` \n
Gateway: `ip route | awk '/default/ { print $3 }'` \n
DNS Server(s): `ifconfig eth0 | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | g$
;; esac
:それは私のアプリの焦点であるので、理想的には、私は、戻って私のメインメニューページで終わるしたいのですがメインメニュー...
オプション2メニュー...
この時点で「OK」を押すと私のアプリが完全に存在します。代わりに、私はそれをメインメニューに戻りたいと思います。