For this assignment you are to create a Bash script that continuously displays a main menu....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
For this assignment you are to create a Bash script that continuously displays a main menu. The main menu will run in a terminal window. Ideally this menu should not exit, however an exception can be made. An example of the main menu is provided below. The menu will allow users to start applications and view log files. The user does not have to know how to execute applications from the command prompt. They have to select it from the menu and the script will start the application in the background. Main Menu Listing 0. Exit (this option can be hidden from display to user) 1. Process Management... 2. Terminal 3. Process Viewer 4. Text Editor 5. Web Browser 6. Logs... The main menu has four applications. It is important that the applications be started in the background. This is applicable for GUI based applications such as Terminal, Process Viewer, Text Editor and Web Browser. The commands for these applications can be found in the table below. Applications and their binary executables Application Terminal Process Viewer Text Editor Web Browser Binary executable gnome-terminal gnome-system-monitor gnome-text-editor firefox In the main menu listing we can see "Process Management" and "Logs". These are sub menus. The two submenus (Process Management Menu Listing and Logs Menu Listing) can be found below. Note that there is an option to return back to the main menu. Process Management Menu Listing 0. Back to Main Menu 1. Running Processes 2. Processes Displayed in Long Format 3. Processes Displayed in BSD Format 4. Display Process Tree without Threads The Process Management Menu Listing is responsible for allowing a user to choose how "ps" and "pstree" commands will be executed. This means that in each case these commands will have a different set of arguments used. In order to identify the best set of arguments, man pages may have to be used. Logs Menu Listing 0. Back to Main Menu 2. 1. Recent dmesg messages Recent kernel messages 3. Recent syslog messages The Logs Menu Listing is responsible for allowing a user to display recently logged messages. For this assignment recently logged messages can be simply defined by the last 20 messages or 20 lines from a log file. There are three log files: dmesg, kernel, and syslog. These log files can be found in /var/log folder. It is up to you how you organize your script. My recommendation is that you create a loop that iterates through the main menu. Each of the three menus can be coded in their own procedures. That is three procedures, one per menu. For this assignment you are to create a Bash script that continuously displays a main menu. The main menu will run in a terminal window. Ideally this menu should not exit, however an exception can be made. An example of the main menu is provided below. The menu will allow users to start applications and view log files. The user does not have to know how to execute applications from the command prompt. They have to select it from the menu and the script will start the application in the background. Main Menu Listing 0. Exit (this option can be hidden from display to user) 1. Process Management... 2. Terminal 3. Process Viewer 4. Text Editor 5. Web Browser 6. Logs... The main menu has four applications. It is important that the applications be started in the background. This is applicable for GUI based applications such as Terminal, Process Viewer, Text Editor and Web Browser. The commands for these applications can be found in the table below. Applications and their binary executables Application Terminal Process Viewer Text Editor Web Browser Binary executable gnome-terminal gnome-system-monitor gnome-text-editor firefox In the main menu listing we can see "Process Management" and "Logs". These are sub menus. The two submenus (Process Management Menu Listing and Logs Menu Listing) can be found below. Note that there is an option to return back to the main menu. Process Management Menu Listing 0. Back to Main Menu 1. Running Processes 2. Processes Displayed in Long Format 3. Processes Displayed in BSD Format 4. Display Process Tree without Threads The Process Management Menu Listing is responsible for allowing a user to choose how "ps" and "pstree" commands will be executed. This means that in each case these commands will have a different set of arguments used. In order to identify the best set of arguments, man pages may have to be used. Logs Menu Listing 0. Back to Main Menu 2. 1. Recent dmesg messages Recent kernel messages 3. Recent syslog messages The Logs Menu Listing is responsible for allowing a user to display recently logged messages. For this assignment recently logged messages can be simply defined by the last 20 messages or 20 lines from a log file. There are three log files: dmesg, kernel, and syslog. These log files can be found in /var/log folder. It is up to you how you organize your script. My recommendation is that you create a loop that iterates through the main menu. Each of the three menus can be coded in their own procedures. That is three procedures, one per menu.
Expert Answer:
Answer rating: 100% (QA)
binbash while true do clear echo Main Menu echo 0 Exit echo 1 Process Management echo 2 Terminal ech... View the full answer
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these accounting questions
-
For this assignment, you are to create a stored procedure that returns a complete dataset to the calling program. The dataset will be based on a query that joins several tables together. The output...
-
For this assignment you will be required view the following two videos on YouTube. www.youtube.com/watch?v=bKJPxCPB-RE www.youtube.com/watch?v=rUns1Jbve0w 1) After watching the video please indicate...
-
Part One: Requirement: You are to create a comprehensive job analysis for a job of your choice. Background Information for (JOB TITLE) Job Analysts Name: Date and Time of interview: Subject Matter...
-
? ?? ? Prepare Company 1's COMPLETE CASH FLOW STATEMENT for 2016 (that includes CFO, CFI, CFF) using INDIRECT approach for CFO part. Explain how to treat for accounting purposes occupation of...
-
A city has adopted the following plan for compensated time off: City employees are entitled to a specied number of days each year for holidays and vacation. The number depends on length of service...
-
Three friends decide to murder their horrible bosses. This is a very funny movie in a very dark way. Beware the vulgarity. Examine the depiction of horrible bosses from the perspective of...
-
Derive an expression for the linear battery model power output as a function of the internal-to-external resistance ratio. Nondimensionalize the power output by dividing it by \(E^{2} / R_{i}\)....
-
Calculating Ending Inventory and Cost of Goods Sold Under FIFO, LIFO, and Average Cost Star Company uses a periodic inventory system. At the end of the annual accounting period, December 31, 2012,...
-
1. In a parallel combination of three resistors (R1, R2, and R3), what will be the mathematical relationship that describes their equivalent resistance? 2. Three resistors with equal resistance ( 6 ?...
-
A vaccine to prevent severe rotavirus gastroenteritis (diarrhea) was given to African children within the first year of life as part of a drug study. The study reported that of the 3298 children...
-
1. Let (0, 1), describe the following language: 1 (0+1)*1. 2. Let ={0, 1}, construct a regular expression for: All string ends with 01. 3. Let = {0, 1}, construct a finite automata for: L=...
-
How do advanced computational fluid dynamics (CFD) simulations contribute to the design and optimization of absorption equipment, particularly in assessing flow distribution and predicting...
-
In the context of absorptive separation processes, how does the introduction of reactive absorption (e.g., using chemical reactants) alter the absorption equilibrium and kinetics? What are some...
-
A 16-year-old girl by the name of Jenny Foster was found hitch-hiking along the Adirondack Mountains Highway in upstate New York. Mr. David Sykes, a driver on the highway, stopped to pick up the...
-
The goals of the YCJA is to prevent crime, rehabilitate and reintegrate offenders, and to ensure meaningful consequences for actions. "To what extent does the YCJA meet the needs of Canadians? If you...
-
When an employee signs a contract with a forced arbitration clause, they typically waive their right to take employment-related disputes to court, including claims related to workplace...
-
Cork University Business School (CUBS) have asked you to make a report on the activities carried out on their social media channels to measure their effectiveness at increasing brand awareness of the...
-
A company pledges their receivables so they may Multiple Choice Charge a factoring fee. Increase sales. Recognize a sale. Collect a pledge fee. Borrow money. Failure by a promissory notes' maker to...
-
Figure 2-27 represents a situation of students who attend and work in schools and who also belong to certain clubs that are located in different schools. Study this diagram carefully to try to...
-
Summarize six important properties of relations.
-
Helen Jarvis wants to determine the most important customers for Home Office products. She requests a listing of total dollar sales year-to-date for each customer who bought these products, as...
-
A system, consisting of \(2 \mathrm{~mol}\) of \(\mathrm{N}_{2}, 5 \mathrm{~mol}\) of \(\mathrm{H}_{2}\) and \(2 \mathrm{~mol}\) of \(\mathrm{NH}_{3}\) initially, is undergoing the following...
-
The following reaction takes place in a system consisting of \(3 \mathrm{~mol} \mathrm{CH}_{4}, 5 \mathrm{~mol} \mathrm{H}_{2} \mathrm{O}\), \(1 \mathrm{~mol} \mathrm{CO}\) and \(4 \mathrm{~mol}...
-
The study of thermodynamics enables us to understand (a) Whether the transformation of energy is feasible or not (b) To what extent the transformation will take place (c) In which direction the...
Study smarter with the SolutionInn App