Using Linux Shell Scripting. - Creating and using the variables FirstNumber and SecondNumber, Implement division by 0, w

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Using Linux Shell Scripting. - Creating and using the variables FirstNumber and SecondNumber, Implement division by 0, w

Post by answerhappygod »

Using Linux Shell Scripting. -
Creating and using the variables FirstNumber and SecondNumber,Implement division by 0, with error trapping, using IF and WHILEcommands, How:
a) using Gedit Linux editor, append to your .sh filecommands that will do the following:
b) Append your name and CURRENT running date and time to a NEWfile called results.txt "CURRENT running date" means, when theprogram is executed the CURRENT running time will be appended toyour results.txt file
c) Using the variables: FirstNumber and SecondNumber, use awhile loop.
d) Ask the user to enter the FirstNumber.
e) If the user enters the value 33 for this FirstNumber, youmust exit THIS Linux Shell Scripting SECTION immediately.
f) Ask the user to enter the SecondNumber.
g) If the user enters the value 66 for this SecondNumber, youmust exit THIS Linux Shell Scripting SECTION immediately.
h) If the SecondNumber is ZERO inform the user that you CAN NOTdivide by ZERO, and ask for a correct SecondNumber only, KEEPINGYOUR FirstNumber. i) If the SecondNumber is NOT a zero, divideFirstNumber by SecondNumber then display all numbers on thiscomputation using labels, and append all numbers on thiscomputation using labels to the results.txt file. example: 4divided by 1 = 4 3) 4
- Worth 1 point. Linux Shell Scripting.
a) MANUALLY download to YOUR computer the file, in the samefolder where your program in the following question b is located:http://users.cis.fiu.edu/~mrobi002/down ... 10.faUsing editors, append to your *.sh file, all the commands needed sothat when you execute your sh file, this file will produce thefollowing: b) Using the file in question 3a, find out and displaythe total amount of ACGT substrings found in the first 1,500 linesin the file in question 3a
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply