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
Get step-by-step solutions from verified subject matter experts
