I'm creating a small program that does some simple math, but cannot run it. It just outputs "Unexpected end of file." I can't seem to find the error.. ?
#!/bin/bash until [ $second_num -ne 0 ]; do echo "Enter number 1:" read first_num echo "Enter number 2:" read second_num echo "Cannot divide by 0. Start over." done result=0 if [ $first_num -ne 999 && $second_num -ne 999 ]; then let result=$((first_num/second_num)) echo $result echo "Program finished!" else echo "You have exited the program." exit 0 fi number=1 while [ $number -lt 100 ]; do echo $number let number=$(( $number % 5 )) echo $number >> sample.txt done