Write a complete bash script

Assignment Help Operating System
Reference no: EM132234569

SCRIPT DESCRIPTION:

Write a complete bash script that monitors who logs in and logs out of the current CSE Linux machine (e.g., cse01, cse02, etc.) where the script is running. In particular, you will check the status of who is logged in every 10 seconds and report each user ID that logs in or logs out during that time frame. Note that there may be more than one user that logs in or out during this interval. You must include the host name when reporting the user ID information. In addition, you will install a custom signal handler to trap the SIGINT (i.e., ^C) one time before you are able to terminate the script with the SIGINT.

You will also print out the current date and time and report the number of users logged in, even if there are no changes (i.e., no one logged in or out during the interval).

Please see the SAMPLE OUTPUT for several examples, including the different scenarios that might occur.

REQUIREMENTS:

- Your script should be well documented in terms of comments. For example, good comments in general consist of a header (with your name, course section, date, and brief description), comments for each variable, and commented blocks of code.

- Your bash script should be named "minor2.sh", without the quotes. Note that this must be done as a bash script, not a C program.

- Your script will be graded based largely on whether it works correctly on the CSE machines (e.g., cse01, cse02, ..., cse06), so you should make sure that your script runs on a CSE machine.

- Please pay attention to the SAMPLE OUTPUT for how this script is expected to work. If you have any questions about this, please contact your instructor or TAs assigned to this course to ensure you understand these directions.

- This is an individual programming assignment that must be the sole work of the individual student. Any instance of academic dishonesty will result in a grade of "F" for the course, along with a report filed into the Academic Integrity Database.

Attachment:- Writing Bash Scripts.rar

Reference no: EM132234569

Show the propagation and transmission delay calculations

How long does it take a packet of length 1,000 bytes to propagate over a link of distance 3,000 km, propagation speed 3 *10^8 m/s, and transmission rate 3 Mbps? Show the propa

Clusters can implemented by leveraging many operating system

Clusters can be implemented by leveraging many operating systems and applications. In a report of 1-2 pages, complete the following: Identify an operating system and applicat

Repeating sequence

Assuming least recently used (LRU) replacement for associative caches, evaluate the effective miss rate if the sequence is input to the given caches, ignoring startup effect

Compare windows operating system with mac os

Compare windows Operating system with mac OS. write advantages and disadvantages of both (400 words). 2. Briefly discuss the usage of the following Microsoft office software

Cache access time of 20ns

Given a cache access time of 20ns, a main memory access time of 1000ns, and a cache hit ratio of 90 percent. Assuming fetches to main memory are started in parallel with loo

Windows client server environment

Describe and critically evaluate the similarities between the Windows and Unix operating systems and Identify and Describe the processes involved in the Windows Client Server

Program of law of total probability

Think about a system that generates ten million audit records every day. Also suppose that there are on average 10 attacks per day on this system and that each such attack is

Database statistics

In an RDBMS, how are the three phases parsing, execution, and fetching carried out? In general, in which phase would you tune a database? Determine database statistics and why

Reviews

len2234569

2/14/2019 9:47:35 PM

i just want the script code with comments. The program must be unique . The cse machine mentioned in the file is a linux server, so if you make the code work for you linux machine it will work on mine.

Write a Review

 
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd