Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( Sc < an Page 1: ! 1 T Module 5 Assessment Time Limit: 1:30:00 Time Left:1:23:08 A 1 4 50 DIL FI 2
( Sc < an Page 1: ! 1 T Module 5 Assessment Time Limit: 1:30:00 Time Left:1:23:08 A 1 4 50 DIL FI 2 5 3 6. @ 2 DEL * F2 W S (00 DIL 3 0 # Question 6 (17 points) Listen Quizzes... $1-12 $2-10 E S./arithmetic.sh 12 10 80 F3 Addition-22 Subtraction=2 Multiplication=120 Division-1 D David Ayaya: Attempt 1 Review the image. What do 12 and 10 represent on the first line of the BASH script? Submit Quiz $ Functions Positional Parameters: 4 D The correct response isn't listed.. Error Codes a F4 R Saved F mccs.brightspace.com % 5 D 6 of 6 questions saved F5 T MacBook Air A 6 D Fo C Y & 7 F7 U DIL : * 00 8 G H J * DII FB ( - O 9 D - DD H K F9 ) O 0 V E DIL 4 F10 P E DIL - X d F11 E C esc - DIL 1 Page 1: ! 1 A BIL Module 5 Assessment Time Limit: 1:30:00 Time Left:1:23:12 Q 2 4 5 3 2 6 @ BIL * F2 W S G DIL # 3 0 Question 5 (16 points) E Listen 80 F3 E D Quizzes $1-12 52- 10 $ Review the image. You have made the script executable however, whenever you run the BASH script nothing happens? What is the most likely reason? David Ayaya: Attempt 1 S./arithmetic.sh 12 10 $ O 4 Ipstat is not a BASH command. This is used with Python. Iptstat lis only valid on Windows You only have Brother printers installed on your Linux computer. You didn't call the function. Question 6 (17 points) Saved Listen Review the image. What do 12 and 10 represent on the first line of the BASH script? a F4 R Saved #!/bin/bash printOptions () { 1poptions-pLaserJet ostat -v F mccs.brightspace.com % D 5 : T < 6 A D MacBook Air P F6 C Y & 7 G H 8 F7 DIL U M 00 8 C DII FB ( 9 D 1 M DD HI K FO ) O O V DIL 4 F10 P - DIL 4 A X F11 4 esc - < > DIL ! 1 Page 1: A T 1 4 Q Module 5 Assessment Time Limit: 1:30:00 Time Left:1:23:22 d: FI THE 2 5 2 3 6 ** W DIL S 1 # 3 DIL O Question 3 (17 points) Saved E Listen E on Quizzes... 80 F3 10: Question 4 (17 points) Listen Listen You have an assignment from your supervisor that requires you to write a BASH script that offers the user a menu with 7 different options for printing. This will allow the user to select the correct printer based on the floor that they are assigned to. Which is most likely the best kind of logic to use with your BASH script? D #!/bin/bash Create 7 different BASH scripts and direct the user to run the correct script. Use an else if statement for each printers. You should write at least 7 if statements. C Review the image. When ever you run the following BASH script, you receive an error. What is the most likely reason? Add all seven printers to the user profile. If they print to the wrong printer, they can take the stairs. Exercise is a good thing. Use a case statement in your BASH script to build your menu. 11 printOptions() ( ARORtions:R LaserJet lostat -v $ David Ayaya: Attempt 1 4 D a F4 R F % 5 = D Saved mccs.brightspace.com 19 : FS T G MacBook Air A 6 G Fo C Y & 7 H 8 F7 U DOL 3 * 00- 8 J DII FB ( 9 D I : DD B K F9 ) O O DIL F10 L P - BIL 91 A X F11 : esc DEL ! 1 A Page 1: 1 4 Q P F1 DIL Module 5 Assessment. Time Limit: 1:30:00 Time Left:1:23:17 2 5 3 @ 2 6 F2 W DIL S G # on 3 10 D Question 4 (17 points) Saved Listen on Quizzes F3 E #!/bin/bash 80 Review the image. When ever you run the following BASH script, you receive an error. What is the most likely reason? printOptions () () printOptions () D ARORtions-R LaserJet Aastat -v Question 5 (16 points) Saved David Ayaya: Attempt 1 $ 4 D Q 9 F4 R You are missing a parenthesis.. You are missing opening and closing curly rackets around the commands in your function. You have the wrong parameter with the Ipstat command. Ipoption is a command that only runs on a Windows OS. F % 5 mccs.brightspace.com > F5 T MacBook Air A 6 Fo Y O & 7 G H 8 F7 U N DEL 00 * 8 J M DII FB - ( 9 a M DD K F9 H O 0 V DEL 4 F10 L I' P BIL di X F11 3 5 Assessment 0:00 6 * DEL F2 Time Left:1:28:34 # 3 ENTL E D Question 1 (17 points) Saved Listen 80 F3 C #!/bin/bash greeting () { } Quizzes... greeting Review the image. When ever you run the following BASH script, it only prints out Hello. What is the most likely reason? echo "Hello $1" Question 2 (16 points) Listen $ 4 You should replace the curly braces with square brackets. When you called your function you didn't pass it an argument. 20 David Ayaya: Attempt 1 You need to remove the quotes from the $1 as this is an integer. You need to add a user to your function and then update it for each new user in your network. R F4 D a F Review the image. When ever you run the following BASH script, you receive an error? What is the most likely reason? % V 5 f FS I T mccs.brightspace.com G A 6 B MacBook Air C F6 Y H & 7 N 8 F7 U * 00 DIL 8 J DII FB 7 M ( O 9 D 1 4 C K DD F9 O < ) 0 L A 75 F10 P A DIL : A F11 DEL 11 + = [ X 70) F12 11 - O } 1 OM esc < 7 BIL ! 1 A Page 1: 1 4 Module 5 Assessment Time Limit: 1:30:00 Time Left:1:23:29 ** FI BIL N 2 3 5 6 2 F2 W DIL S 1 0 #3 DEL Question 2 (16 points) Saved Listen E 8.0 F3 1#!/bin/bash 2 3 selection= 4 until ["Sselection"="0" ]: do 5 echo PROGRAM MENU 1-Display free disk space 2-Display free memory G-exit program 6 7 DEL Quizzes... Review the image. When ever you run the following BASH script, you receive an error? What is the most likely reason? 8 9 10 11 " 12 13 14 15 16 17 18 19 D 20 esac 21 done 22 echo-n "Enter selection:" read selection echo " case Sselection in 1) df;; 2) free:: 0) exit:: *) echo "Please enter 1, 2, or 0 Replace until with while. $ David Ayaya: Attempt 1 4 d F4 R F 15 % 5 X x / c Iy C mccs.brightspace.com F5 T D MacBook Air A 6 Y & 7 8 F7 * 00 B IN DIL 8 G H J * DII FB ( 9 D 1 DE K M F9 H 0 O J DIL F10 P - E DIL 3 F11 esc DAIL ! 1 A Page 1: Q 1 4 Module 5 Assessment Time Limit: 1:30:00 Time Left:1:23:27 $8 FI BIL N 2 5 @ 2 3 6 F2 W mm. S X # ID 3 DOL 10 11 E 0 3 selection= 4 until [ "$selection"="0" ]: do: 5 echo" 6 7 B 9 12 13 14 15 16 80 F3 D PROGRAM MENU 1-Display free disk space 2-Display free memory. 17 18 19 20 esac 21 done 22 Quizzes... 0-exit program echo-n "Enter selection:" read selection echo- case Sselection in Question 3 (17 points) Saved 1) df;; 2) free:: 0) exit:: *) echo "Please enter 1, 2, or 0" C $ 4 David Ayaya: Attempt 1 O Replace until with while. + Replace the colon with a semicolon on line 4 next to do. Remve esac as this isn't a BASH command. Repace the [] square brackets with () parentheses. a F4 R F % 5 F5 mccs.brightspace.com/ T C G MacBook Air 6 D F6 Y & 7 H 8 0 F7 C V RN B 00 * 8 DAL J DII FO * ( 9 I 1 M DD K F9 O O V d BATL F10 L P CEL 91 FIL A
Step by Step Solution
★★★★★
3.50 Rating (150 Votes )
There are 3 Steps involved in it
Step: 1
Based on the provided information in the first line of the BASH script 12 and 10 are the positional parameters 1 and 2 respectively These parameters are passed to the script when it is executed likely ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started