08 Jun Ask the user to enter the gender
Question
University of Phoenix Material
Linux® Script Worksheet –Marks 10
To: Facilitator’s name
From: Your name
Date: mm/dd/yyyy
Linux® Script 1 (2 Marks)
| Requirements |
| Create a new file called week5prog1.sh with vi or pico editor.
Edit your new file using VIand change it so it performs the following actions:
Save the file and type your file name to execute. |
| Source Programs: |
| Insert your source code here.
$ catweek5prog1.sh |
| Output Results: |
| Insert the output here. Use a screen shot of the output with input requirements specified in the assignment.
1. Give execute permission to the user, group only 2. Run the script and show the output here |
Linux® Script 2 (2 Marks)
| Requirements |
| Create a new file called week5prog2.sh with vi or pico editor.
Edit your new file using VIand change it so it performs the following actions:
You need to use “grep”, “if” , “else” “$?” |
| Source Programs: |
| Insert your source code here.
$ catweek5prog2.sh |
| Output Results: |
| Insert the output here. Use a screen shot of the output with input requirements specified in the assignment.
1. Give execute permission to the user, group only 2. Run the script and show the output here |
Linux® Script 3 (3 Marks)
| Requirements |
| Here is the question:
Some commands like cp, mv, mkdir need arguments. Similarly this script needs only two arguments. If user enters no arguments or one argument or three or more than 3 arguments, it displays error message like “You need to enter two arguments “ If user enters two arguments, it displays the arguments in reverse order . Create a new file called week5prog3.sh with vi or pico command Edit your new file using vi and write the script: Create a new file called week5prog3.sh with vi or pico command.
|
| Source Programs: |
| Insert your source code here.
$ catweek5prog3.sh |
| Output Results: |
| Insert the output here. Use a screen shot of the output with input requirements specified in the assignment.
1. Give execute permission to the user, group only 2. Run the script and show the output here with the following input A. $ week5prog3.sh B. $ week5prog3.sh Tom C. $ week5prog3.sh Tom David Smith D. $ week5prog3.sh Tom David |
Linux® Script 4 (3 Marks)
| Requirements |
| Create a new file called week5prog4.sh with vi or pico editor
Here is the question: Write a program which displays 4 options to the user and asks the user to enter one option and displays the output depending on the choice. If the user enters any other character, display error message that he has to enter only a, b, c or d a. Current date and time b. No of users currently logged in c. List of directories in PATH variable d. Your login name using “LOGNAME” variable (hint : Use the case statement and read the option with read command) |
| Source Programs: |
| Insert your source code here.
$ cat week5prog4.sh |
| Output Results: |
| Insert the output here. Use a screen shot of the output with input requirements specified in the assignment.
1. Give execute permission to the user, group only 2. Run the script and show the output here with the following inputs each time when the scripts prompts like 1st Run : Enter an option : a 2nd Run : Enter an option : b 3rd Run : Enter an option : c 4th Run : Enter an option : d 5th Run : Enter an option : x |
Can you write the following same script with if-else-if and case statements ?
1. Ask the user to enter the gender
2. If the gender is F/f , tell the user that “You are a female”
3 If the gender is M/m tell the user that “You are a male”
4. For any other, say “invalid choice”
After completing the script, do this:
1. Show the contents of the script
2. Give execute permission
3. Run the script and show the output for M, m, F, f, x, X, Y, 0
Determine the benefits and disadvantages of using UNIX® or Linux® versus Windows Server® within the organization based on
•Networking (Internet protocol)
Write about 4 pages including the first title page and the last References page. Please follow APA format and insert visuals like graphs, tables, pie-charts etc.
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 Writedemy
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 “Order Now” 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.
