Question: Can you please make this script work for me please #!/bin/ksh # Script name: printnum.sh # Case #1: ./printnum.sh # Verify the number of arguments

Can you please make this script work for me please

#!/bin/ksh # Script name: printnum.sh # Case #1: ./printnum.sh # Verify the number of arguments and exit if not equal to 1. if [ $# -ne 1 ] then printf "error: program must be executed with 1 argument " printf "usage: $0 value (where value >= 1) " exit 1 fi # Verify argument is a positive number if [ $1 -le 1 ] then printf "error: argument must be a positive number " printf "usage: $0 value (where value >= 1) " exit 1 fi # Store command line argument in variable i X="$1" # Loop and print $i while decrementing variable to =1 (with comma) XXXXX [ $i -gt 1 ] do printf "$i, " i=$(($i - 1)) XXXX # Print the last digit without a comma printf "Xi X

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!