Hi,
this is my first question on here, so hi to everyone.
Secondly, this may be a really dumb question, but I need help so please be gentle!
I'm trying to learn the commandline unixy stuff for osx. I've got this bash script I want to run
I put it in a textedit file and save it as Documents\Bash Scripts\firstBashScript.sh
I open the Terminal, move to the dir and give the permissions
chmod +x firstBashScript.sh
everything seems aok so far.
then I try
firstBashScript
but Terminal says:
-bash: firstBashScript: command not found
I've tried chmod a+x and chmod u+x as I've seen various on the web, and then try running the script, but I still get the same error.
I just want to run the script - what do I need to do?????? Sorry, this is obviously so obvious that no one on the net seems to have explicitly written it down, it's all "now run the script"...
this is my first question on here, so hi to everyone.
Secondly, this may be a really dumb question, but I need help so please be gentle!
I'm trying to learn the commandline unixy stuff for osx. I've got this bash script I want to run
Code:
#! /bin/bash
echo "Hello from a bash script file."
I put it in a textedit file and save it as Documents\Bash Scripts\firstBashScript.sh
I open the Terminal, move to the dir and give the permissions
chmod +x firstBashScript.sh
everything seems aok so far.
then I try
firstBashScript
but Terminal says:
-bash: firstBashScript: command not found
I've tried chmod a+x and chmod u+x as I've seen various on the web, and then try running the script, but I still get the same error.
I just want to run the script - what do I need to do?????? Sorry, this is obviously so obvious that no one on the net seems to have explicitly written it down, it's all "now run the script"...