Interact graphically in bash script
xmessageMost *nix computers are equipped with xmessage Software, it can recover the choices made by the user graphically. The following code will display a dialog box with two buttons and a little text.
You will find if you look at the return code for example with the following command:
xmessage -buttons Yes,No -center "Are you sure you want to do that?"
the return value is 1 if left clicking on the cross, 101 if you click 'Yes' and 102 if you click 'No'.
In fact the first button returns 101, the second 102...
Use this return code as you wish.