Question: PART 3: Shell Programming and External Variables(10 points) a, Write another Bash program where you assign two strings to different variables, and then the program

 PART 3: Shell Programming and External Variables(10 points) a, Write another

PART 3: Shell Programming and External Variables(10 points) a, Write another Bash program where you assign two strings to different variables, and then the program prints both of those strings. Write a version where thestrings are printed on the same line, and a version where the strings are printed on different lines. So for example: variable A "I Love", varaible B-"Shell programming Then print out the content both variables: so that "I Love Shell programming would print b. How will shell know where to find an executable? Create three variables: NAME (set to your name), CLASS (set to BIO2110). CHALLENGE_LEVEL (set to a number from 1 to 10 describing how challenging the class is. d. Using your three variables above echo to the screen the following sentence" Alice find BIO2110 to be at challenge level 5" PART 4 AWK Programming (EXTRA CREDIT 10 points) Create an AWK program that uses the SPARCS-noQuotes.csv file that you created during your lab activity for recreate it). Calculate the average Total Charge per stay and per day. Remember each record represents one hospital stay and the field Length of Stay (LOS) represents the numbr of days the patient stayed each visit. You must submit the code you wrote-as a text file so that I can run this code. A screen shot of your execution and the output. Note for full credit this should be done using AWK. Your program should print out the following two lines: Total Records Total LOS Total Charge Avg Cost per Stay Avg Cost per Day 3 6 700 233.33 116.67 **Please note above numbers are from the example below. So for example if you have 3 patients: Length of Stay Total Charge 200 300 200 2 3 1 The total charges for all patients would be (200+300+200) 700 Number of hospital stays=3 Total length of stay - (2+3+1) = 6 Average cost per stay will be (700/3) = $233.33 Average cost per day will be (700/6) $116.67

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!