Course Solutions Uncategorized (Solved) : Create New Script Script5sh Following Code Done Change Permissions 755 Bin Bash Value 5 Va Q33347932 . . . .

(Solved) : Create New Script Script5sh Following Code Done Change Permissions 755 Bin Bash Value 5 Va Q33347932 . . . .

 

Create a new script, script5.sh, with the following code. Whendone, change its permissions to be 755.

#!/bin/bash

value=5

while [ $value -gt 0 ];do

value=$((value+1))

echo $value

done

Run the script. It does not stop. Why not? You have an infiniteloop. Type ctrl+c to exit the program. 6) What is causing theinfinite loop (meaning the loop never ends)?

————————————————————–

Write the following as script6.sh and change its permissions toexecutable. Pay very close attention to spacing!

#!/bin/bash

count=0

for num in $@;do

if [ $num -eq 10 ];then

count=$((count+1))

fi

done

echo The number 10 was found$count times

Run the script as ./script6.sh10

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post