07-menu.sh 676 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. # shellcheck disable=SC2046
  3. set -f
  4. set +f -- $(stty size)
  5. height=$(($1 / 2))
  6. width=$(($2 / 2))
  7. numitems=$((height / 2))
  8. whiptail \
  9. --title 'menu' \
  10. --backtitle 'whiptail' \
  11. --ok-button 'Aceptar' \
  12. --cancel-button 'Cancelar' \
  13. --menu \
  14. 'Selecciona una opción:' \
  15. "${height}" \
  16. "${width}" \
  17. "${numitems}" \
  18. '<-- Back' 'Return to the main menu.' \
  19. 'Add User' 'Add a user to the system.' \
  20. 'Modify User' 'Modify an existing user.' \
  21. 'List Users' 'List all users on the system.' \
  22. 'Add Group' 'Add a user group to the system.' \
  23. 'Modify Group' 'Modify a group and its list of members.' \
  24. 'List Groups' 'List all groups on the system.'