RE: bash - command - PATH question [not cygwin issue last post]

2010-05-19 Thread Rockefeller, Harry
-Original Message- > From: cygwin-ow...@cygwin.com [mailto:cygwin-ow...@cygwin.com] On Behalf Of > Eric Blake > Sent: Wednesday, May 19, 2010 2:51 PM > To: cygwin@cygwin.com > Subject: Re: bash - command - PATH question > > On 05/19/2010 01:42 PM, Rockefeller, Ha

Re: bash - command - PATH question

2010-05-19 Thread Eric Blake
On 05/19/2010 01:42 PM, Rockefeller, Harry wrote: > $ type mysvn > mysvn is hashed (./mysvn) There's your problem. Bash remembers the hashed location of where it last found the command, but that location is relative. You either need to disable bash's hashing, or force it to re-evaluate its hash

RE: bash - command - PATH question

2010-05-19 Thread Rockefeller, Harry
On 05/19/2010 12:45 PM, Rockefeller, Harry wrote: > After more testing, where > > "export PATH=$PATH:~/bin" only exists in .bash_login. > > If I run 'foo' from my login directory it works. > If I then cd to a different place I get the error > > bash: ./bin/foo: No such file or directory Eric B

Re: bash - command - PATH question

2010-05-19 Thread Eric Blake
[please don't top-post] On 05/19/2010 12:45 PM, Rockefeller, Harry wrote: > After more testing, where > > "export PATH=$PATH:~/bin" only exists in .bash_login. > > If I run 'foo' from my login directory it works. > If I then cd to a different place I get the error > > bash: ./bin/foo: No such f

RE: bash - command - PATH question

2010-05-19 Thread Rockefeller, Harry
m] On Behalf Of Rockefeller, Harry Sent: Wednesday, May 19, 2010 11:22 AM To: cygwin@cygwin.com Subject: RE: bash - command - PATH question I double and triple checked for DOS things \r, ^M, etc. I use emacs to edit and so it's pretty clear about DOS things. Anyway, I ran od -c on files and

RE: bash - command - PATH question

2010-05-19 Thread Rockefeller, Harry
gwin.com] On Behalf Of Rockefeller, Harry Sent: Wednesday, May 19, 2010 10:38 AM To: cygwin@cygwin.com Subject: RE: bash - command - PATH question I found that if I give the simple 'bash' command to create a new shell then type 'foo' it does work. [quote on] -Original Messa

Re: bash - command - PATH question

2010-05-19 Thread Jeremy Bopp
On 5/19/2010 10:37 AM, Andrew DeFaria wrote: > On 05/19/2010 08:31 AM, Rockefeller, Harry wrote: >>> Again, have you tried dos2unix foo? >> Yes this didn't help. > That's funny because this is the usual cause. Are you sure there is no > extra carriage return line endings. I usually check by going i

Re: bash - command - PATH question

2010-05-19 Thread Jeremy Bopp
On 5/19/2010 10:16 AM, Rockefeller, Harry wrote: >> On 5/19/2010 8:50 AM, Rockefeller, Harry wrote: >>> Given that 'foo' is a bash script, why is it that: >>> >>> $ foo >>> >>> returns the error: >>> >>> bash: ./bin/foo: No such file or directory > >> What happens when you directly run ./bin/foo?

RE: bash - command - PATH question

2010-05-19 Thread Rockefeller, Harry
o: cygwin@cygwin.com Subject: Re: bash - command - PATH question Again, have you tried dos2unix foo? On 05/19/2010 08:16 AM, Rockefeller, Harry wrote: >> On 5/19/2010 8:50 AM, Rockefeller, Harry wrote: >> >>> Given that 'foo' is a bash script, why is it that: &g

Re: bash - command - PATH question

2010-05-19 Thread Andrew DeFaria
On 05/19/2010 08:31 AM, Rockefeller, Harry wrote: Again, have you tried dos2unix foo? Yes this didn't help. That's funny because this is the usual cause. Are you sure there is no extra carriage return line endings. I usually check by going into vim and seeing if it says [DOS} at the bottom (

RE: bash - command - PATH question

2010-05-19 Thread Rockefeller, Harry
> Again, have you tried dos2unix foo? Yes this didn't help. [snip] -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

Re: bash - command - PATH question

2010-05-19 Thread Andrew DeFaria
Again, have you tried dos2unix foo? On 05/19/2010 08:16 AM, Rockefeller, Harry wrote: On 5/19/2010 8:50 AM, Rockefeller, Harry wrote: Given that 'foo' is a bash script, why is it that: $ foo returns the error: bash: ./bin/foo: No such file or directory What happens when yo

RE: bash - command - PATH question

2010-05-19 Thread Rockefeller, Harry
> On 5/19/2010 8:50 AM, Rockefeller, Harry wrote: > > Given that 'foo' is a bash script, why is it that: > > > > $ foo > > > > returns the error: > > > > bash: ./bin/foo: No such file or directory > What happens when you directly run ./bin/foo? I get exactly the same error. The error is cor

Re: bash - command - PATH question

2010-05-19 Thread Andrew DeFaria
On 05/19/2010 06:50 AM, Rockefeller, Harry wrote: Given that 'foo' is a bash script, why is it that: $ foo returns the error: bash: ./bin/foo: No such file or directory BUT since foo is *really in* PATH, e.g., $ `which foo` runs correctly? Usually this means that foo is in "DOS" mode and co

Re: bash - command - PATH question

2010-05-19 Thread Jeremy Bopp
On 5/19/2010 8:50 AM, Rockefeller, Harry wrote: > Given that 'foo' is a bash script, why is it that: > > $ foo > > returns the error: > > bash: ./bin/foo: No such file or directory What happens when you directly run ./bin/foo? What is the shebang (first line) of foo? > BUT since foo is *real