Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a shell script that displays the following menu items, prompt the user to enter a selection, and then executes the command associated with

1. Write a shell script that displays the following menu items, prompt the user to enter a selection, and then executes the command associated with that menu item. If required, prompt the user for additional commands should the menu item require it.

The menu items:

(a) Display a list of files and directories in the current directory

(b) Display a long list of the contents of the current directory

(c) Display a list of the last n messages in /var/log/messages, prompting for the value of n

(d) Display the contents of this script

(e) Display the contents of this script in reverse

(f) Exit the script Dont forget to have the script keep running until the user selects the exit option.

Linux keeps track of all log-in attempts in the file var/log/auth.log. Write a shell script that searches the contents of this file and displays any entries where a user logged onto the system as the administrative user (that user will have user name of root and a uid of 0).

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

The nature and importance of the global marketplace.

Answered: 1 week ago

Question

1. Design an effective socialization program for employees.

Answered: 1 week ago