Running a shell script in *nix
Posted
by
Ben
on Server Fault
See other posts from Server Fault
or by Ben
Published on 2009-11-04T19:07:57Z
Indexed on
2012/04/03
23:31 UTC
Read the original article
Hit count: 310
Bit of a newb using *nix (I'm actually using a bash shell in OS X 10.5) and I wondered what the probably very simple answer is to this...
When I write a script (called, say, my_script) and I've saved it to the current directory, why do I have to put a period and a forward slash in front of its name to run it? Like this:
./my_script
Can't the shell tell that I want to run it from the current directory? Windows seems to handle that situation.
Cheers Ben
© Server Fault or respective owner