Recent Question/Assignment

NIT1202 Operating Systems
UNIX Script Assignment 2
For this assignment, you may work with one partner, if desired.
You are required to write a Bourne Again Shell Script (bash) to manage a menu driven program.
When executed the user should be presented with a menu with 4 (four) options:
1. Print the following user information: the home directory, path, userid , login shell together with the current date and time.
2. Ask a user a range and it displays eight random number between the range. [Range difference must be 100. Example Enter a range: 200 300
3. Print out the highest and the lowest numbers of the generated eight random numbers
4. Exit the program
Your script must allow one of these options to be chosen at a time. The menu must be presented over and over again, until the fourth option (exit) is chosen. An appropriate error message must be displayed if an invalid option is chosen.
Option one, your script should list the specified environment variables. The current output of the date command, together with the userid and the full name of the user also needs to appear in this file, before the environment variables.
Option two should prompt the user a range and displays eight (8) random numbers.
Option three should list the highest and lowest number of the generated random numbers.

Option four should cause a graceful exit from the menu and the whole program.
To Be Handed in:
• A copy of your working bash shell script needs to be handed in to your tutor and uploaded in VU Collaborate Assignment Dropbox.
? Make sure your script includes your name and ID.
? Make sure the code is well commented.
• Documentation including:
? A neatly formatted print-out of your bash shell script
? Appropriate and specific acknowledgments of aid you received from people, books, journals, etc. for this assignment.
Remember to make your script user-friendly and easy to read!

• the degree to which the problem has been correctly solved
• the structure and clarity of the solution
• the quality of the accompanying documentation
Date Due: Friday Week 12 5 PM
You are required to demonstrate in Week 11 during your lab time. If you do not demonstrate, you get a 0 mark.
Late submission of assignment will NOT be accepted. You are strongly advised to plan to hand-in your assignment early to make allowance for any last minute hitches.
The accompanying documentation for the assignment must be word-processed.
This task is worth 25% of the assessment for the unit.

UNIX Shell Script Assignment 2 Marking Scheme
Name: __________________________ Tutor:______________________________
4 options in the main menu
Menu: Repeats until option 5 is chosen
Traps invalid menu choices
Option 2 prompts for user input
User-friendly prompts, error messages and output
Option One Prints:
Home directory
User ID
Login shell
Current Date/Time
Option Two:
User Input
Display random numbers between the range
Option Three:
The highest number
The lowest number
Option Four: Smooth exit
Data validation
Well commented and structured code
Formatted print out of final script
Overall presentation of report (including description, print out of code supplied, test data and referencing)


NOTE: Your final mark will be converted to 25 /100
Additional Comments (if any):

Looking for answers ?

Recent Questions

MODULE NAME: MODULE CODE:WEB DEVELOPMENT (INTRODUCTION) WEDE5010/d/pWEB DEVELOPMENT (INTRODUCTION) WEDE5020/dASSESSMENT TYPE: POE (PAPER )TOTAL MARK ALLOCATION: 100 MARKSTOTAL HOURS: A minimum of 30 HOURS...Figurative languageDescriptionMain plotTwistThemeIt's a narrative story so please make the characters express more emotion. Preferably in year 9-10 standard, make it about a type of social issue. E.g...College of Business, Hospitality and Tourism StudiesSchool of Accounting and LawDepartment of AccountingACC803: Advanced Financial ReportingSemester 1 | 2021__________________________________________________________________CASE...PhysicsIA3Student nameStudent numberTeacherMarking summaryCriterion Marks allocated Provisional marksResearch and planning 6Analysis and interpretation 6Conclusion and evaluation 6Communication 2Overall20ConditionsTechnique...CHAPTER 1 GLOBAL MARKETING IN THE FIRM39CASE STUDY 1.1Build-A-Bear Workshop (BBW): how to manage the global comeback?In spring 2010 the founder of BBW, Maxine Clark, is enjoying one of the beautiful May...Chosen Country is Italy ASSESSMENT 3 BRIEFSubject Code and Title MGT608 Business Law and International ContextsAssessment Board PaperIndividual/Group Group (2 or more)Length 5 minute presentationLearning...ASSESSMENT 1 BRIEFSubject Code and Title MIS602 Data Modelling and Database DesignAssessment Modelling ReportIndividual/Group IndividualLength N/ALearning Outcomes The Subject Learning Outcomes demonstrated...Show All Questions