Shell script to display the sorted list of logged in user names:
In unix, there may be multiple users work together. This script helps one to know or share the things to other user who logged in to the same server. The "who" command will prints information about all users who are currently logged in.
By using "who" we will get the NAME TERMINAL TIME IP information But we only need usernames hence we use grep command to show required information.
In unix, there may be multiple users work together. This script helps one to know or share the things to other user who logged in to the same server. The "who" command will prints information about all users who are currently logged in.
By using "who" we will get the NAME TERMINAL TIME IP information But we only need usernames hence we use grep command to show required information.
echo "List of logged in users are:" who | cut -d " " -f 1
No comments:
Write comments