Tested out dialog a bit

This commit is contained in:
2013-12-24 16:11:10 +01:00
parent 187223e542
commit eb98644bed
5 changed files with 67 additions and 5 deletions

23
Labb7/test_dialog_menu.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
# Jack-Benny Persson
# LX13
# Testing menus with dialog
# Binaries
Dialog="/usr/bin/dialog"
# Sanity check
if [ ! -x $Dialog ]; then
echo "Can't excute $Dialog"
exit 2
fi
$Dialog --menu "Choose your editor" 10 60 3 vi "The vi Editor"\
emacs "The emacs Editor" nano "The nano Editor" 2> /tmp/editorchoice
Editor=`cat /tmp/editorchoice`
$Dialog --msgbox "You selected $Editor" 10 60
exit 0