Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

The creation of the menu will involve writing procedural code, using decision logic, writing a loop, and using the case statement.  Although it is not required for grading, it is recommended that you flowchart and /or pseudo code your solution before coding.

General requirements

1. The script should contain a comment header as we discussed in class.  Include comments / pseudo code in your script.

2. Include the 'shebang' line for the bash shell found on Ubuntu.

3. Redirect any errors to a separate error file.

4. Clear the screen, change directories to the directory and present the current directory to the screen.

5. Make your file read, write, executable for the owner (that's you), read and executable for group and no permissions for other. -rwxr-x---

6. Create all report files with read only permissions for owner and group and no permissions for other.

7. At top of the menu check for the existence of the subdirectory logs.  If it does not exist, create it. 

8. Store the program directory in a variable and use it to define the full file name.

9. For each report write the files to the new logs directory, add the time to make it unique for each instance, i.e. whoyymmddhhmm.rpt

10. After writing the report to the disk, display all of the reports to the screen.  Look into using the awk program to 'pretty up' the report.  See the examples in the exercises.

11. Create a separate error file for each of the menu selections, adding the date and time like the report file, i.e. whoyymmddhhmm.err

The menu

1. Create a menu with the following selections (Hint start out by just creating the menu and echoing a message on the screen when a selection is made:

a. Who is on system report

b. Process Report

c. Web server report

d. Disk Space Report

e. Backup reports

f. Quit

2. Who is on System Report  --Create a new empty file to contain the first report.

a. Put the current date and time at the top of the file in this format: MM/DD/YY HH:DD (hint not default output - use formatting.)

b. List the users on the system and redirect the output from standard output to the file retaining the date and time you put in the file in task above.

c. Count the number of users on the system and add it to the end of the file.

d. Using one of the paginators, view the file you just created

3. User Process Report -- Create a second new file to contain report 2

a. Put the current date and time at the top of the file in this format: MM/DD/YY HH:DD (hint not default output - use formatting.)

b. List all of the processes associated with a tty into the file.

c. Sort the file by the process id.

d. Count the number of processes and put to the bottom of the file.

e. Using one of the paginators, view the file you just created

4. Web Server Report -- check for the program httpd.  Print a message on the screen with the status.  No files needed here.

5. Backup Reports -- Use the tar command and create a backup.  The backup should have the following functionality:

a. In the new logs directory, check to see if a sub-directory of archive exists, if it does not create it. 

b. Archive the files into a compressed tar ball in the logs/archive folder. 

c. Check if the file to check if it was created and has size greater than zero.

d. Check the file counts in the tar ball valid (hint use a file size check and/or compare the file count from the tar tv command with the count of files from the ls command)

e. If the backup passed the validation, remove the report and error files.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9525101

Have any Question?


Related Questions in Programming Language

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As