* Re: why my path can't work properly?
1998-04-02 5:00 why my path can't work properly? Bo Pan
@ 1998-04-02 5:00 ` Dan A. Mercer
1998-04-02 5:00 ` Nikola Milutinovic
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Dan A. Mercer @ 1998-04-02 5:00 UTC (permalink / raw)
Bo Pan (bpan@unix1.sncc.lsu.edu) wrote:
: I am using OSF1 V4.0 alpha. my path is set as (use echo $PATH):
: /usr2/users/bpan/bin:/usr/bin:/usr/dt/bin:/usr/bin/X11:.
: there is a excutable file hello in bpan/bin, I do following:
: tom1 [bpan]% hello
: hello: Command not found.
: tom1 [bpan]% which hello
: /usr2/users/bpan/bin/hello
: tom1 [bpan]%
: tom1 [bpan]% /usr2/users/bpan/bin/hello
: run properly.
: what's the problem?
: if I telnet to tom1 from other machine, no such problem.
: by the way, what is the difference between $path and $PATH?
: echo $path
: echo $PATH
: display same paths but different format.
: and in script, the difference is event bigger. how to use them?
: thanks in advance.
: Bo
Did you forget to rehash after changing your PATH?
--
Dan Mercer
Reply To: damercer@mmm.com
Opinions expressed herein are my own and may not represent those of my employer.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: why my path can't work properly?
1998-04-02 5:00 why my path can't work properly? Bo Pan
1998-04-02 5:00 ` Dan A. Mercer
@ 1998-04-02 5:00 ` Nikola Milutinovic
1998-04-03 5:00 ` Barry Margolin
1998-04-03 5:00 ` Rich Kus
3 siblings, 0 replies; 6+ messages in thread
From: Nikola Milutinovic @ 1998-04-02 5:00 UTC (permalink / raw)
Bo Pan wrote:
>
> I am using OSF1 V4.0 alpha. my path is set as (use echo $PATH):
> /usr2/users/bpan/bin:/usr/bin:/usr/dt/bin:/usr/bin/X11:.
> there is a excutable file hello in bpan/bin, I do following:
>
> tom1 [bpan]% hello
> hello: Command not found.
> tom1 [bpan]% which hello
> /usr2/users/bpan/bin/hello
> tom1 [bpan]%
> tom1 [bpan]% /usr2/users/bpan/bin/hello
>
> run properly.
> what's the problem?
> if I telnet to tom1 from other machine, no such problem.
What does that line "hello: Command ..." suggest? That hello cannot find
something? (Otherwise, your shell would be reporting an error, like
"zsh: hello not found") Maybe that's the problem?
> by the way, what is the difference between $path and $PATH?
> echo $path
> echo $PATH
path is a C-Shell variable and PATH is Bourne/Korn/Bourne_Again/Z-Shell
variable. You're probably running ZSh, ignore path, use PATH instead.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why my path can't work properly?
1998-04-02 5:00 why my path can't work properly? Bo Pan
1998-04-02 5:00 ` Dan A. Mercer
1998-04-02 5:00 ` Nikola Milutinovic
@ 1998-04-03 5:00 ` Barry Margolin
1998-04-03 5:00 ` idupulap
1998-04-03 5:00 ` Rich Kus
3 siblings, 1 reply; 6+ messages in thread
From: Barry Margolin @ 1998-04-03 5:00 UTC (permalink / raw)
In article <Pine.A32.3.95.980402010117.73124B-100000@unix1.sncc.lsu.edu>,
Bo Pan <bpan@unix1.sncc.lsu.edu> wrote:
>I am using OSF1 V4.0 alpha. my path is set as (use echo $PATH):
>/usr2/users/bpan/bin:/usr/bin:/usr/dt/bin:/usr/bin/X11:.
>there is a excutable file hello in bpan/bin, I do following:
>
>tom1 [bpan]% hello
>hello: Command not found.
Is hello a script of some kind? This can happen if the filename in the #!
line at the beginning doesn't exist. Also, that filename has to be a full
path; the system won't search for it in PATH.
--
Barry Margolin, barmar@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why my path can't work properly?
1998-04-03 5:00 ` Barry Margolin
@ 1998-04-03 5:00 ` idupulap
0 siblings, 0 replies; 6+ messages in thread
From: idupulap @ 1998-04-03 5:00 UTC (permalink / raw)
you might also want to check the executable permission of the script.
Barry Margolin <barmar@bbnplanet.com> writes:
> In article <Pine.A32.3.95.980402010117.73124B-100000@unix1.sncc.lsu.edu>,
> Bo Pan <bpan@unix1.sncc.lsu.edu> wrote:
> >I am using OSF1 V4.0 alpha. my path is set as (use echo $PATH):
> >/usr2/users/bpan/bin:/usr/bin:/usr/dt/bin:/usr/bin/X11:.
> >there is a excutable file hello in bpan/bin, I do following:
> >
> >tom1 [bpan]% hello
> >hello: Command not found.
>
> Is hello a script of some kind? This can happen if the filename in the #!
> line at the beginning doesn't exist. Also, that filename has to be a full
> path; the system won't search for it in PATH.
>
> --
> Barry Margolin, barmar@bbnplanet.com
> GTE Internetworking, Powered by BBN, Cambridge, MA
> *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
^ permalink raw reply [flat|nested] 6+ messages in thread
* why my path can't work properly?
1998-04-02 5:00 why my path can't work properly? Bo Pan
` (2 preceding siblings ...)
1998-04-03 5:00 ` Barry Margolin
@ 1998-04-03 5:00 ` Rich Kus
3 siblings, 0 replies; 6+ messages in thread
From: Rich Kus @ 1998-04-03 5:00 UTC (permalink / raw)
In article <Pine.A32.3.95.980402010117.73124B-100000@unix1.sncc.lsu.edu>,
Bo Pan <bpan@unix1.sncc.lsu.edu> wrote:
>I am using OSF1 V4.0 alpha. my path is set as (use echo $PATH):
>/usr2/users/bpan/bin:/usr/bin:/usr/dt/bin:/usr/bin/X11:.
>there is a excutable file hello in bpan/bin, I do following:
>
I am just guessing below because I don't know what the program hello
looks like?:
you may want to edit your PATH from:
PATH=/usr2/users/bpan/bin:/usr/bin:/usr/dt/bin:/usr/bin/X11:.
to:
PATH=/usr/bin:/usr/dt/bin:/usr/bin/X11:/usr2/users/bpan/bin:.
your script is having trouble finding commands because paths were not
declare before running hello.
>tom1 [bpan]% hello
>hello: Command not found.
>tom1 [bpan]% which hello
>/usr2/users/bpan/bin/hello
>tom1 [bpan]%
>tom1 [bpan]% /usr2/users/bpan/bin/hello
>
>run properly.
>what's the problem?
>if I telnet to tom1 from other machine, no such problem.
>
>by the way, what is the difference between $path and $PATH?
>echo $path
path is used by csh and tcsch.
>echo $PATH
PATH is used by bourne shell family such as sh, ksh, bash
>display same paths but different format.
>and in script, the difference is event bigger. how to use them?
>
>thanks in advance.
>
>Bo
>
richk
^ permalink raw reply [flat|nested] 6+ messages in thread