Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Do the exercise on bash and show a screen dump for the following questions. a. Define a variable population with value 20000 and print

image text in transcribed
1. Do the exercise on bash and show a screen dump for the following questions. a. Define a variable population with value 20000 and print it on screen with a title: The Population in Jasper is: 20000 Note: You must use the variable to print the value 20000 b. There is a file game.exe sitting in the following directory. (Note: You do not have to run this command. Just WRITE the answer) /users/lionking/games/exefiles/ Write a bash statement to set a symbolic link named game to the game.exe file. c. To find the Area of a square the formula A = wr? is used. (r = radius, pi=22/7) Write a bash script to a. Read the radius of a circle Eg: Enter the radius of a circle: 3.0 Note: user enters the value 3.0 (and not hard coded) b. Calculate and print the Area of the circle The Area of the circle with radius 3.0 is 28.27 sq. units. [YOU MUST INCLUDE THE SCRIPT FILE (.sh file) IN THE ZIP) d. Write a bash script to read in variables x and y and then print sum, difference, product and quotient of and y as shown below. Read the two variables x and y on two prompts: Input a number for x 20 (user enters 20) Input a number for y: 10 (user entered 10) Sum of 20 and 10 is: 30 Difference of 20 and 10 is: 10 Product Sum of 20 and 10 is: 200 Quotient Sum of 20 and 10 is: 2 (YOU MUST INCLUDE THE SCRIPT FILE (.sh file) IN THE ZIP) e. Name the 3 standard streams in Unix/Linux? (No screen dump needed) f. 1. Open any editor and create a test.txt file and type in "hello world in the file and save it. 2. Write a bash command to count the number of characters in the test.txt file. & TEXAS A&M UNIVERSITY SAN ANTONIO Use loops. (Use class note example bash_sec_09_example_5.sh as a guide). You are given a series of numbers: 1, 3, 6, 7, 9, 10, 12, 15, 18, 21 Write a loop (for, do or while) to print the cube of each of the above numbers. Your output must look like: Cube of 1 is = 1 Cube of 3 is = 27 [YOU MUST INCLUDE THE SCRIPT FILE (.sh file) IN THE ZIP)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Define marketing.

Answered: 1 week ago

Question

What are the traditional marketing concepts? Explain.

Answered: 1 week ago

Question

Define Conventional Marketing.

Answered: 1 week ago

Question

Define Synchro Marketing.

Answered: 1 week ago

Question

Language in Context?

Answered: 1 week ago