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

Create xml documents to contain well-defined information, The objectives of...

The objectives of this assignment are to test your ability to create XML documents to contain well-defined information. This assignment will be used further in Assignment 2, so ple

Cobol program, need someone to write a simple cobol program for me..urgent

need someone to write a simple cobol program for me..urgent

Programming and modelling in uml, Introduction Currently, Omega has 178...

Introduction Currently, Omega has 178 stores UK wide. Most cities and large towns within the UK are catered for by Omega. Omega began in 1960's selling various makes of telep

Exploding land mines cause damage to military vehicles, In combat simulatio...

In combat simulation software, exploding land mines cause damage to military vehicles. In addition to the damage done to the vehicles themselves, we are interested in the number of

Operating systems, I do have an assignment in operating systems programming...

I do have an assignment in operating systems programming ... how can i attach my file?

OOPs Concepts. Explain Object-oriented programming, OOPS Concepts Object-or...

OOPS Concepts Object-oriented programming (OOP) is a computer science term used to characterize a programming language that began development in the 1960’s. The term ‘object-orient

Create a reservation system, Villa La Fourche Ltd is a small family busines...

Villa La Fourche Ltd is a small family business situated in the East Coast of Mauritius, more precisely Trou d'eau Douce.   The compound comprises of 6 independent villas, each of

Define remote procedure call, Problem: (i) Define Remote Procedure Cal...

Problem: (i) Define Remote Procedure Call (RPC). (ii) Explain with diagram how RPC works? (iii) A remote procedure is uniquely defined by (a) Program number. (b)

Outline the norms to be designing a web page, Question: (a) Outline th...

Question: (a) Outline the six norms to be considered before designing a Web page. (b) Write a program such that when a user right-clicks anywhere on a Web page, the follow

C# xna game project, I need to finish my game project within two weeks usin...

I need to finish my game project within two weeks using XNA. Would you guys can help me to finish it? Thank you

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