I have to hand write responses to a script that is already given to me. The two sets of information I have to give an output for are if the variables that will be read are 3 3 3, and 20 3 5.
I decided to test the script first, but keep having syntax errors on line 19, and can't figure out what the issue is. I have tested multiple variants of the spacing and parenthesis, but can't quite get there. Any help would be appreciated.
#!/bin/sh ## Name of the program is challengelab3.2 ## request information from the user echo enter 3 numbers read a b c ## check for proper range of numbers if [ $a -gt 10 -o $b -gt 10 -o $c -gt 5 ]; then echo "numbers out of range" exit 1 fi # process_data x=$(($a + $b + $c)) while [ $x -gt 0 ] do echo (( $x / 2%2 )) x=$((expr $x -1)) done # end of program