Search This Blog

Wednesday, May 27, 2009

Dialog command example, how to make alerts in script?

dialog display dialog boxes from shell scripts

e.g

dialog --title "You Title" --yesno "\nDo you want to do this" 7 40
sel=$?
case $sel in
0) echo "You Clicked Yes";;
1) echo "You Clicked No";;
255) echo "Canceled by user by pressing ESC key";;
esac

No comments:

Post a Comment