Erik,
 Never mind all that. If you're using bash then you can't "source
/sw/bin/init.sh". source is a c shell function. The equivilent in bourne
shell is a period. So what you want is 
. /sw/bin/init.sh

Paul 

>>> Erik Price <[EMAIL PROTECTED]> 01/24/02 20:25 PM >>>
Paul,

Thank you, but yes, I use /sw/bin/bash as my default shell, though.  But

there is something related:

I noticed that whenever I execute /usr/bin/which and it fails to find 
the file, it would say "no foo in /sw/bin /sw/sbin /sw/bin /sw/sbin 
/usr/bin /bin /Users/eprice/bin (etc)".  But whenever I did "echo 
$PATH", the output was as expected:  /sw/bin /sw/sbin /usr/bin /bin 
/Users/eprice/bin (etc)".

Note that "which" is checking /sw/bin and /sw/sbin twice for the file, 
according to this error message.  So, reading the man page, I discovered

that /usr/bin/which checks the .cshrc file for $PATH information.  I 
thought this was strange, that /usr/bin/which would be so shell-specific

like that (don't most utilities just check for a standard environment 
variable, like $PATH ?).  This led me to take a look in my .cshrc.

I haven't used my .cshrc since I first installed Fink, because of course

why use tcsh when you can have bash?  But that's beside the point.  It 
turns out that I still had "source /sw/bin/init.csh" in my .cshrc file. 

Because of this, I suspect that /usr/bin/which was checking the .cshrc, 
finding the reference to /sw/bin/init.csh, and executing it somehow, in 
effect causing /sw/bin and /sw/sbin to be searched TWICE.

I don't know much about how the /usr/bin/which utility works, but I 
thought that this was interesting -- for those of you who have switched 
to another shell as your default, but still have a ".cshrc" file sitting

in your home directory, you may wish to rename it or comment out the 
"source /sw/bin/init.csh".  It doesn't do any harm to have 
/usr/bin/which search through /sw/bin and /sw/sbin twice but if you're 
OCD like I am then that kind of thing bothers you and you probably want 
to do something about it.

On the flip side, I still haven't figured out what may have taken 
/usr/sbin and /sbin out of my default $PATH.  I checked the Fink init 
script that I use (I source /sw/bin/init.sh from my ~/.bash_profile), 
and that doesn't have any effect.  But on the other hand, I don't recall

EVER manually changing my $PATH variable or running any other system 
startup scripts that do.  What file is used by Darwin as the equivalent 
of /etc/profile (for system-wide default shell configuration)?


Cheers,
Erik

PS: Paul, hope you don't mind I 'listed' this response, I thought others

could benefit.


On Thursday, January 24, 2002, at 11:12  AM, Paul Lieberman wrote:

> Erik,
>  That would be a problem. If your shell is the default tcsh then you
> want to
> source /sw/bin/init.csh
>   init.sh is for bash, sh or other Bourne shells.
>
> Paul



_______________________________________________
Fink-beginners mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-beginners

Reply via email to