". / command" instead of "command" ???

". / command" instead of "command" ???

Post by Keeo » Thu, 20 Apr 2000 04:00:00



Hi,

Probably just a simple question for all you people...
I used to some scripts I wrote, just by typing the name of the file,
after chmodding it to an executable...
But somehow it seems that now I have to run a little script by preceding it
with './ '
Instead of typing "./a.out ", I wanted a simple "run", but it can't run
"run", until I
type "./run"...

The users who need this, run (pd)ksh under FBSD 3.4.
This is not needed for the "usual" commands when I 'm in their dir...
Something to do with the
"path", I suppose...

okay, problem should be quite clear, now....
Is there anybody with a sollution? Please?

KeeoS

 
 
 

". / command" instead of "command" ???

Post by Martin Dieringe » Fri, 21 Apr 2000 04:00:00



> Hi,

> Probably just a simple question for all you people...
> I used to some scripts I wrote, just by typing the name of the file,
> after chmodding it to an executable...
> But somehow it seems that now I have to run a little script by preceding it
> with './ '
> Instead of typing "./a.out ", I wanted a simple "run", but it can't run
> "run", until I
> type "./run"...

"." is not in your PATH and that for good reasons.
it is risky to have the current
dir in the PATH, because you could easily execute untested programs
or mix them up with unix commands

m.

 
 
 

". / command" instead of "command" ???

Post by A. van Werv » Fri, 21 Apr 2000 04:00:00


KeeoS asks:

Quote:>Is there anybody with a sollution?

Have them add . to their path.

Alphons (who doesn't WANT . in his path)

--
A. van Werven               http://www.linuxfreak.com/~alphons
Leiden Institute of Advanced Computer Science, The Netherlands
It's safe to remove /etc/passwd entirely.
                        -- J. Wunsch in comp.unix.bsd.freebsd.misc

 
 
 

". / command" instead of "command" ???

Post by Heiko Recktenwal » Fri, 21 Apr 2000 04:00:00



> Is there anybody with a sollution? Please?

Adding . to the path, well...but did you notice, that there is a ~/bin
directory in there ? Thats where I have scripts, that I dont want in
/usr/local/bin.

H.