It's a slight mistake. The script should be:
Code:
#!/bin/bash
echo "Please enter your first name"
read firstname
echo "Hello $firstname I hope you are doing well"
Use the '$' prefix to substitute the
contents of the variable. Omit the '$' to refer to the variable itself. In the read, you want the data to go into firstname. In the echo you want to display the
contents of firstname.
EDIT:
As a side note, I would suggest getting into the habit of referring to variable contents with the ${} notation. For example:
Code:
echo "Hello ${firstname} I hope you are doing well"
It makes the code completely clear as to what variable is being substituted. It's also necessary in some other advanced techniques which I'm sure you'll learn about in due time