Creating script with menu options for manage users task

*Some useful cmd:

– Check machine information: hostnamectl

– List all shell installed in system: cat /etc/shells

– Check current shell usage: echo $0  or echo $SHELL

How to Get the Directory of a Bash Script - Codefather

* Create script for create new user with input password if username not existed in system

*Add Loop Structure For Implement iterating Create New User Script:

– Re-Building code with separated input functions and use while-loop structure for check and iterating get input from user when condition of input checking not satisfied (user already existed or password verify not matched), so not need exist as previous script.

*Building Menu For Simple Management Users Tool:

– Using select construct generates a menu to get user choices for different function of tool. Create simple menu for create menu for simple script with 3 options: Check user informations, Create new username and Quit tool as below:


Vui lòng nhập bình luận của bạn
Vui lòng nhập tên của bạn ở đây