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

Questions Cloud

Is manufacturing overhead overallocated or underallocated : Actual manufacturing overhead costs incurred in June $41,700. Is manufacturing overhead overallocated or underallocated for the month of June? By how much
What is the total cost of job : Squire Corporation charged Job 110 with $13,900 of direct materials and $12,200 of direct labor. What is the total cost of Job 110
What is cost of goods sold : Manufacturing overhead has an underallocated balance of $12,400; and cost of goods sold is $170,000. What is cost of goods sold
How you would design and construct the workshop : After reviewing the Communication Module, and the results of your communication and problem-solving assessments, describe how you would design.
Write a complete bash script : Assignment – Writing Bash Scripts - Write a complete bash script that monitors who logs in and logs out of the current CSE Linux machine
What is cost of goods available for sale : Page's sells books. Beginning merchandise inventory $14,000 and Ending merchandise inventory $12,000. What is cost of goods available for sale
Public administration and business administration : Public Administration and Business Administration: Siamese Management Twins Separated at the Heart?
Expressing frustration about the budgeting system : An employee comes to you expressing frustration about the budgeting system saying that it is too rigid and does not allow for quick purchasing for unexpected
Create a management and leadership plan : Now that Sarah has delivered the workshop and waitstaff seem to be on board with the new style of service, Sarah's next challenge is to create a management.

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

Operating System Questions & Answers

  Maximum power transfer theorem

For the circuit below, what is the voltage across R(load) if the Maximum Power Transfer Theorem determines the value of R(load)?

  Describe advantages of having a componentized system

Consider a typical house in which there are several bedrooms, a kitchen, and a laundry room-each with a distinct function. You sleep in the bedroom, you wash clothes in the laundry room, and you cook in the kitchen. Each room encapsulates all the ..

  How to implement a priority-based scheduler

In this assignment, you will learn how to implement a priority-based scheduler for xv6. You'll do two things in this assignment: You'll replace xv6's current round-robin scheduler with a priority-based scheduler

  Simple procedure to implement the graphics package

The group of classes represent a collection of graphic objects, such as circles, rectangles, lines, and points.

  Explain the impact on the disks cache of several queries

Explain the impact on the disk's cache of several queries running concurrently, each scanning a different file. Can the above problem be addressed by the DBMS buffer manager doing its own prefetching? Explain.

  Multiple user identifications and passwords

Given multi-network access, it's not unusual for users to have multiple user identifications and passwords. How would you manage these multi-password situations? Describe both the advantages and disadvantages of your solution.

  A computer training company needs an enterprise-wide network

The company is leasing space in Building 2 (120' across a parking lot on the same property) in which will be moved from

  Provide the sed command to move the email addresses

Provide the sed command to: Substitute the 3rd occurrence of "asu" in email address with "vcu".

  What are the features that make them different

Why are there so many versions of OS? What are the features that make them different? Explain the pros and cons of each. How can the evolution of OS benefit an organization and cause harm to an organization?

  G a proces switch, the operating system executes instruction

During a process switch, the operating system executes instructions that choose the next process to execute. These instructions are typically at a fixed location in memory. Why?

  Research several password-encryption cracking tools

Research how the tools work from the perspective of taking advantage of the operating system's weaknesses. Research several password/encryption cracking tools.

  Different measures used to protect operating systems

Write a paper discussing the relative advantages and disadvantages of at least three different measures used to protect operating systems. The ease of implementation and the associated security management issues should also be addressed. Finally, ..

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