Question: Write a bash script that takes no command line arguments and reads one number from the standard input with no prompt. If there is a

Write a bash script that takes no command line arguments and reads one number from the standard input with no prompt. If there is a command line argument, it displays No command line arguments please, and proceed to read one integer. If the integer read could be the diagonal of a right angled triangle with the other two sides are integers, then it prints YES, otherwise prints NO on the standard output.

CPU % q23.sh 17 No command line arguments please

7 NO

CPU%

CPU % q23.sh

5 YES

CPU%

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!