Question: Please type your answer, thank you! :) The subject is UNIX Create a new file with the name myfirstscript.sh. Write a new script that performs

Please type your answer, thank you! :)

The subject is UNIX

Create a new file with the name "myfirstscript.sh". Write a new script that performs the following tasks in sequence;

  1. Display the usernames of currently logged in users; sorted from a-z
    1. HINT: You will need to filter the output of the whocommand
  2. Display a list of usernames who are logged into the system more than once
    1. HINT: usernames that are logged in more than once = not 'unique'
  3. Display a list of usernames that have been logged in since yesterday

Also, provide the commands to;

  1. Set read and execute permission for the user and member of the users group; read-only permission for others; and write permission for the user only
  2. Run your script from its stored directory

Note: The output of your script must be self-explanatory. For example, the output for the users who are currently logged into the system must be preceded by a header like this: List of users who are currently logged in to the system in alphabetical order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!