Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Creating a Bash Script File After you are satisfied with your hands-on log session in 8.1, create and execute a bash script using a text

Creating a Bash Script File

After you are satisfied with your hands-on log session in 8.1, create and execute a bash script using a text editor of your choice that does the following:

Scenario: Say that you want to check whether a specified user is on the system or, if not, to be informed as soon as the user logs in.

Write a script, uon, that will do this for you. In the uon script, use an until loop that will stop as soon as the loop condition is true (i.e. user of interest has logged onto the system). Pass the username as a positional argument.

Usage: ./uon

Write a script called uon that does the following:

Lists current date

Displays your username

Uses the until loop

Determines if a user has logged on

Informs you when the user logs in

Notes:

Run the script in the background so that you can do other work while waiting for user to log on.

Include a beep and message to inform you when the user has logged on.

Display all standard output to the file, result.

Provide a test run that shows a user has logged on (this may even be yourself if need be).

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_2

Step: 3

blur-text-image_3

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 Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

How is the carrying valueof a discount note computed?

Answered: 1 week ago

Question

Describe the types of multiblade dampers.

Answered: 1 week ago

Question

=+ what roles should government play in them ?

Answered: 1 week ago

Question

=+ Why do we have markets and, according to economists,

Answered: 1 week ago