User Input Shell Script

Hello

I am trying to create a user input shell scipt. The objective is user should enter the circuit number and the input is saved in a log file. If the user does not enter anything then the question should prompt it until the circuit no. is entered.
Can any one please correct the code below. Appreciate your response.

 
#!/bin/sh
path=/var/log/circuit.txt
reply=" "

while ($reply ne ' ')
{
echo "Enter the Circuit Number:"
chomp ($reply = <STDIN>)  >> $path
}

while ($reply ne ' ') : you are testing if the string $reply contains a space.
I think you want to test if it contains nothing.

I made the change but I get the below errors:

./circuit.sh: line 7: syntax error near unexpected token `$reply'
./circuit.sh: line 7: ` chomp ($reply = <STDIN>)'
 
#!/bin/sh
path=/var/log/circuit.txt
reply=

while [ -z "$reply" ]
{
  printf "Enter the Circuit Number: "
  read reply
}