I am currently following a Linux tutorial and right now I am trying to learn about shell scripts. The tutorial instructed me to make a new .sh file, so I made a file called test.sh. I was then supposed to use the command "chmod 755 test.sh", and I did. Next, I had to add the following lines of code to the file:
echo "Hi there"
echo "what is your name? (Type your name here and press Enter)"
echo "Hello $NM"
I put these lines of code in, and saved the file. Next, I was told to execute the script by using the ./test.sh command. However, this resulted in the following error:
./test.sh: line 2: echo Hi there: command not found
./test.sh: line 3: echo what is your name? (Type your name here and press Enter): command not found
./test.sh: line 4: read NM: command not found
./test.sh: line 5: echo Hello : command not found
Im really stumped as to why this is happening. Im very new to linux, Ive been using windows for the last 8 years. It seems to me as though I might be missing a file of some sort that contains the shell scripting source code, or maybe a path that is supposed to point to the shell scripting source code is incorrect. Then again, Im just assuming there is some sort of shell scripting source code, so I could be way off. Thanks to anyone in advance who can help me.