Linux and Networking

Linux and Networking

4.21. Menus in shell scripts.

In many applications menus are necessary. In shell script, although many programs are batch type (automatic or batch processing), sometimes it is necessary to use the menus. The best way to understand a menu is by looking at one as an example.

The menu above is self-explanatory. If at any time you want to make a menu. You just have to copy and modify as needed to get what is required. Below I propose another exercise with some more options than the previous one.

 

Proposed exercise:

Create a visual.sh script with a menu that performs the following options:

Option 1 list the script

Option 2 list the script from the last line to the first

Option 3 list the script with the lines reversed from right to left

Option 4 exit

The Demeter Project