Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write the command to set the following permissions on a script file with the following name; myscript.sh Owner: full access; read, write and execute

1. Write the command to set the following permissions on a script file with the following name; myscript.sh

Owner: full access; read, write and execute Group: read and execute Other: no access

2. 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

3. Write a script that performs the following actions;

Define the following two variables with the provided values; variable lab with value lab? variable labs with value lab* Display the value of lab and labs Define a variable named price with a value of 84.5 Define a variable named sentence and use the price variable to set its value to "The price of the book is $84.5"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions