Question: linux Under your home directory, create a directory called project3_[university_id] and inside the directory, write a shell script called mysh. When mysh is executed, it
linux
Under your home directory, create a directory called project3_[university_id] and inside the directory, write a shell script called mysh. When mysh is executed, it displays the prompt: myprompt > and accepts one of the following six commands:
1. myfinger name1 name2 name3 ...
This command will display the login name, full name, home directory, and the default shell for each of the names given on the command line.
If one of the names is not found, it should display an error message corresponding to that name.
If myfinger is entered without any arguments, then the login name, full name, home directory, and the default shell should be displayed for all the users logged in to the system at that time. You can use the who command to retrieve all users logged in to the system.
You are not allowed to use the finger command in implementing this command.
You can rely on the format set by prj2_passwd file from Project 2 to implement this command.
Example usage:
local-machine$ echo $PATH
/usr/bin:/bin:/usr/sbin
local-machine$ ./mysh
myprompt > mywhich command1
/usr/bin/command1
/usr/sbin/command1
myprompt >
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
