Chat with us, powered by LiveChat LINUX OPERATION SYSTEM MANAGEMENT | Writedemy

LINUX OPERATION SYSTEM MANAGEMENT

LINUX OPERATION SYSTEM MANAGEMENT

linux operation system management

1. Create a file named breeds and type in the following information:

echo “Enter the name of a breed of animal”

read breed

case $breed in

arabiam|palomino|clydesdale) echo “$breed is a horse”;;

jersey|guernsey|holstein) echo “$breed is a cow”;;

husky|shepherd|setter|labrador) echo “$breed is a dog”;;

siamese|Persian|angora) echo “$breed is a cat”;;

*) echo “$breed is not in our catalog”;;

esac

2. Save and exit the editor

3. Make the file breeds executable

4. Run the program 5 times, and give the output for each:

First try type: husky

Second try type: holstein

Third try type: clydesdale

Fourth try type: angora

Fifth try type: terrier

5. Type the following program into your editor, and then run it.

#!/bin/sh

clear

echo “Use one of the following options:”

echo “d To display the time and date”

echo “p To see what directory you are currently in”

echo “w To see a list of who is online”

echo “Enter your option and hit Enter: c”

read option

case $option in

a. date;;

p) pwd;;

w) who;;

*) echo “That was not a valid selection”;;

esac

echo “Good bye”

6. Explain what the program above accomplished:

7.

clear

echo “Type a letter from the Greek alphabet”

read letter

case $letter in

Alpha|alpha|ALPHA) echo “$letter is the first letter in the Greek alphabet”;;

Beta|beta|BETA) echo “$letter is the second letter in the Greek alphabet”;;

Gamma|GAMMA|gamma) echo “$letter is the third letter in the Greek alphabet”;;

OMEGA|omega|Omega) echo “$letter is the last letter in the Greek alphabet”;;

*) echo “$letter is not a letter in the Greek alphabet”;;

esac

Explain what the pipe symbol is doing in the above program.

8. Write your own case statement where the user can type the name of a Car Maker, and your program will give a response determined by you. For example:

Question: What Car Maker are you interested in?

User Response: Ford

Program Response: Ford is a good car

Do this for 4 different car makers. Also remember to include a catchall in case the user types in a car maker that does not exist.

9. Using your knowledge of the while loop, take the program from #5, and nest that case statement inside a while loop, so the case statement will keep on running until q is typed. I left spaces below where the parts of the while loop, and the interactivity between the user and the program would go (ex. asking the user to enter a new choice, and allowing for it).

Line 1: # Use a counter

line 2: clear

line 3: “Use one of the following options:”

line 4: echo “d To display the time and date”

line 5: echo “p To see what directory you are currently in”

line 6: echo “w To see a list of who is online”

line 6: echo “ Enter your option and hit Enter: c”

line 7: read option

line 8:

line 9:

line 10: case $option in

line 11: d) echo `date`;;

line 12: p) echo `pwd`;;

line 13: w) echo `who`;;

line 14: *) echo “That was not a valid selection”;;

line 15: esac

line 16:

line 17:

line 19:

line 20: echo “Good Bye”

10. Using the car maker script from number 8, add a while or an until to make it run over and over until the user types Q.

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.

Do you need an answer to this or any other questions?

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.

Hire a tutor today CLICK HERE to make your first order