Script
----------------------------------------------------------------------------
dialog --title "Input Box" --inputbox "Enter your name" 8 60 2>/tmp/inputTmp.$$
sel=$?
name=`cat /tmp/inputTmp.$$`
case $sel in
0) echo "Hello $name" ;;
1) echo "Cancel Pressed" ;;
255) echo "ESC key pressed" ;;
esac
rm -f /tmp/inputTmp.$$
No comments:
Post a Comment