Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What are the commands for these? ( Introduction to Linux/Unix ?) The script should do the following: Define a variable log whose value is the

What are the commands for these? (Introduction to Linux/Unix ?)

The script should do the following:

Define a variable log whose value is the filename for the log file, users.log .

Append the date to the log file whose name is contained in log.

Append a line of dashes to this log file to act as a separator.

Append a list of the users currently on to users3 to this log file.

Append a blank line to the log file.

The value users.log should be assigned to the variable at the top of the script. Thereafter, never never write "users.log" in your script. Use the value of log instead. Be sure you append the output so the log grows each time you run the script. After running this script twice, the log file users.log should look something like this:

 $ cat users.log Wed Dec 5 10:38:58 EST 2012 ----------------- Login Name Tty Idle Login Time Office Office Phone it244gh Dummy for Glenn Hoffman pts/0 Dec 5 10:29 (dsl092-066-161.bos1.dsl.speakeasy.net)

Be sure to test this script several times to make sure it works.

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

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions