When I run this script it displays options in a menu style on my terminal and then runs the relavent command in the script.
#!/bin/sh
TEMP=/tmp/answer$$
dialog --ascii-lines --title "Administrative tasks" --menu "Tasks :" 20 0 0 1 "Display firewall settings" 2 "Restore firewall settings" 3 "Flush Firewall settings" 2>$TEMP
choice=`cat $TEMP`
case $choice in
1) iptables -L
;;
2) iptables-restore </etc/iptables.firewall.rules
iptables -L
;;
3) iptables --flush
iptables -L
;;
esac
echo Selected $choice
But when it exits the screen is messed up.
Is there a way to "save" the state of screen before I ran this and restore it?
Is there a better "Windows" scripting program that runs in a text screen?
screen
screen
exits, it too clears the screen)