Displaying GUI Boxes in Linux Bash scripts can be done easily using whiptail. In Windows OS, msgbox, inptubox is quite helpful on VBA, Visual Basic and even in .NET world. Displaying Graphical boxes in Linux bash scripting is quite simple to do. To navigate on this GUI boxes, used "Tabs","Arrow Keys" and "Space Bar" as enter key. Here's a simple example of Whiptail that display GUI Boxes and ping the sites that are selected. #!/bin/bash # Step 1: Checkbox URL menu CHOICES=$(whiptail --title "Checkbox Ping URLs Example" \ --checklist "Select one or more options:" 15 50 5 \ "ping -c 2 bing.com;" "Ping bing" OFF \ "ping -c 2 duckduckgo.com;" "Ping ddg" OFF \ "ping -c 2 search.com;" "Ping search" OFF \ "ping -c 2 google.com" "Ping google" OFF \ 3>&1 1>&2 2>&3) # Exit gracefully if nothing was selected or user pressed Cancel ...
Make the world a better place by sharing knowledge, ideas and anything that you can give that comes from the heart.