Program for create a menu, Programming Languages

Assignment Help:

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.


Related Discussions:- Program for create a menu

We are looking for on-call developers, Pre-order integration on Shopify sto...

Pre-order integration on Shopify store We are looking for on-call developers who can integrate Celery on client Shopify stores. Requirements a) Contented editing Shopify them

Pseudocode for a program that reads a temperature, Write a pseudocode for a...

Write a pseudocode for a program that reads a temperature as a whole number from a user and outputs a “probable” season (winter, sprint, summer, or fall) depending on the temperatu

Implement a lunar lander simulation, 1. Modify your solution to #8 so that ...

1. Modify your solution to #8 so that if an ellipse is touched by the mouse, it turns permanently green.Bonus (up to +5): a green ellipse stops moving, but recovers after 5 seconds

3 halves, #1. Every mathematics student likes primes numbers. Every mathema...

#1. Every mathematics student likes primes numbers. Every mathematics student like parabolas. Let''s put them together to have some fun: Consider two natural numbers a and b. Of co

Help pagination of oracle reports when printed from browser, Oracle 11G Rep...

Oracle 11G Reports We are troubleshooting the pagination of Oracle reports when printed from a browser. We need help determining the issue and correcting within the report ou

Corba multiple clients, I have an assignment that requires from me to run ...

I have an assignment that requires from me to run multiple clients and one server ( Corba)

Maze-solving, For this assignment you will use the robot/maze simulation ex...

For this assignment you will use the robot/maze simulation example introduced in mini-assignments 0625ma-0627ma to develop a maze-solving program. The program will read a file cont

Pop game application , In this exercise you will develop a small 'Pop Game'...

In this exercise you will develop a small 'Pop Game' in which the user will "pop" shapes that are drawn on the screen. The game will be time based, showing a shot clock at the top

Write Your Message!

Captcha
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