I have written the following shell script:
#!/bin/bash
total=0
echo “Please enter 10 numbers >”
read VAR1 VAR2 VAR3 VAR4 VAR5 VAR6 VAR7 VAR8 VAR9 VAR10
total=$((VAR1+VAR2+VAR3+VAR4+VAR5+VAR6+VAR7+VAR8+VAR9+VAR10))
echo $total
Running echo in the command line command e.g. (see below) echoes the phrase fine
echo "Please enter 10 numbers >”
But when I try to run the shell script the text isn't echoed. The script works, if I run it and type in 10 numbers the correct total is returned, but this is not useful if you don't know to type in the numbers! I have double checked that /bin/bash is correct by running
echo $SHELL
which returns /bin/bash so I'm not sure what the problem might be.