Please help me with this error I received with a shell script in Bash:
line 8: [: 2: unary operator expected
echo "Input your number for factorial calculation: "
while [ $counter -le $nr ]
factorial=$(( $factorial * $counter ))
counter=$(( $counter + 1 ))
echo "The result " $nr "! is:"
read takes name of the variable, not its value. You need to replace
read $nr with