Answered step by step
Verified Expert Solution
Question
1 Approved Answer
LAB ASSIGNMENT 5 Write a script named user info to report some information about a user. Your script should run the finger, w and last
LAB ASSIGNMENT 5 Write a script named user info to report some information about a user. Your script should run the finger, w and last commands for the user specified on the command line. Your script will be invoked by typing user info user name The user name from the command e w be available within your script as $1. All three of the commands, finger, w and last can be run using $1 to specify the user name. The last command prints information about previous logins, which could be excessive. You should use the -10 option to last to report on no more than the 10 most recent logins. LAB ASSIGNMENT 6 Write a shell script named group report. This script will accept a list of group names on the command line and produce a group report detailing the group id and the number of group members identified in /etc/passwd for each group. The report should resemble the following Group Report Group GID Count 301 CSS faculty 300 SP student 302 439 78 24 2624 304 You will notice that the report format is not deal. This is typical of the results obtained using echo. You may like to use man echo to learn a little more control techniques for echo. It also seems like the cut command would be a useful tool for extracting the group id from the proper line of /etc/group for each group
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started