#!/bin/bash # brezular v0.1 function show_choices { echo -e "\n*** Script changes password for user 'tc' ***\n" echo -e "a) Change password for 'tc'" echo -e "q) Quit script\n" } uid="$UID" [ "$uid" != 0 ] && echo -e "\nRun '$0' as root, exiting" && exit 1 while true; do show_choices read val case $val in a) passwd tc /usr/bin/filetool.sh -b 1>/dev/null ;; q) exit 0 ;; *) echo -e "\n*** Please, enter valid option ***" ;; esac done