BASH script doesn't follow the execution rules
Posted: Sun Jan 15, 2012 1:55 am
I am new to Mint 12 (love the distro) but not new to Debian linux
I am trying to get a simple script to run on my new Mint 12 installation. The typical "Hello world" script doesn't quite work:
#!/bin/bash
# My first script
echo "Hello World!"
This will execute in the given script directory (such as local "bin") if I type
./my_script
under terminal
but not if I type:
my_script
even though chmod 755 has been done to the file, and even though .profiles says that "bin" is a valid directory for BASH script to execute.
So, I am rather stumped at the moment. I am just trying to do "normal" things here. I want to execute any script where the script file is placed in the user's private bin directory. Normally this simply runs.
Any ideas? This is the kind of thing that once you know the answer, you go "Aha!"... so simple to fix.
Thanks... -B
I am trying to get a simple script to run on my new Mint 12 installation. The typical "Hello world" script doesn't quite work:
#!/bin/bash
# My first script
echo "Hello World!"
This will execute in the given script directory (such as local "bin") if I type
./my_script
under terminal
but not if I type:
my_script
even though chmod 755 has been done to the file, and even though .profiles says that "bin" is a valid directory for BASH script to execute.
So, I am rather stumped at the moment. I am just trying to do "normal" things here. I want to execute any script where the script file is placed in the user's private bin directory. Normally this simply runs.
Any ideas? This is the kind of thing that once you know the answer, you go "Aha!"... so simple to fix.
Thanks... -B