14 Aug Unix Scripting
Need assistance in completing a Unix Scripting assignment. The assignment asks to write 3 scripts
- Write a script that tests for a command line argument, i.e. $1. If it is not provided, prompt the user to enter a value. Test the user input. If it is blank prompt the user at most two more times (3 times total). If the input is blank all three times, exit the script with the error, ”No input supplied by user”. Otherwise, exit the script with the output, “The user entered {userInput}, length: {length of userInput}”
- Write a script that simulates a game of chance. Start the user with 25 units. Prompt the user to [P]lay or [Q]uit. If the user chooses [Q]uit, exit the script and output the user’s current total. If the user chooses [P]lay, deduct 1 unit from the user’s total and generate a random number between -5 and 5. Adjust the user’s total by that value. If the user’s value goes to zero or below, output “Sorry, game over.”, and exit; otherwise, output the result, the user’s new total and prompt the user to [P]lay or [Q]uit.
- Write a script that takes an absolute directory path as its argument. The script should examine that directory and count the number of child directories, the number of regular files, and the number of regular files that are executable. It should output the following:
Results for directory: {dir}
Number of child directories: {subdirs}
Number of regular files: {regfiles}
Number of executable files: {exfiles}
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Wridemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.