Shell script noobie question?
I'm running mdk 9.0, Bash version 2.05b.0.
I'm going through the "Linux Shell Scripting Tutorial v1.05r3 A Beginners Handbook"
I would like to be able to execute the scripts that I make from any directory that I happen to be in.
To have the ability to do this I have followed the directions in the tutorial yet I'm still unable to execute the script by script name from any directory.
I've create one script so far by following this tutorial.
Script name: "first"
#My first Shell Script
echo "Knowledge is Power"
I then save this and do "chmod +x first"
sh first...executes fine
bash first...executes fine
Then I type:
cd (to make sure I'm in my home directory)
cp first ~/bin
Then type.... first ..... and I get:
bash: first: command not found
If I do "echo $PATH" I get the following:
This is the default path that was installed by linux ManDrake.
The Tutorial just assumes that this should work, but it doesn't, and it doesn't offer any other tips as to why it doesn't or what I need to do to get this working.
Any helps is appreciated.