• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fink and 'sh'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fink and 'sh'


  • Subject: Re: Fink and 'sh'
  • From: Graff <email@hidden>
  • Date: Mon, 22 Mar 2004 23:18:21 -0500

On Mar 22, 2004, at 4:50 PM, Brennan wrote:

On 22/3/04 at 16:17, Graff <email@hidden> wrote:

Of course, as someone already said, this solution depends on the
"where" command being able to find the "lame" command. The problem is
that the "where" command looks at your PATH, which is not set properly
in the first place. This means that it won't find "lame" so it is kind
of circular in this case. I didn't think of this when I first posted
my answer.

Hmm. I don't really understand this. What do you mean when you say that
PATH is not set properly? I understand that PATH is an environment
variable, presumably a list of places where to look for commands. However,

Your PATH environment variable gets set through various initialization scripts, some of which only run when you open up a certain kind of shell a certain way. I'm not quite at the level of knowing and understanding where and how all of these work. I do know that Fink installs the command:

source /sw/bin/init.csh

Into one of your initialization scripts. I currently have that command in my ~/.tcshrc file - an initialization file for tcsh.

This command does a bunch of things, one of which is to add the following paths to the start of your PATH variable:
/sw/bin
/sw/sbin

Now, depending on what initialization script this command gets added to will determine when and how your PATH variable gets set. When I run the following command from AppleScript:
do shell script "echo $PATH"

I get:
/usr/bin:/bin:/usr/sbin:/sbin:/Users/currentuser

However when I do:
do shell script "tcsh -c 'echo $PATH'"

I get:
/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/currentuser:/usr/ X11R6/bin

This is because I have the additional items added in my .tcshrc file or some other script that gets run when I start up a tcsh session.

Someone else can fill you in on all the files that can get run when you create a shell in different ways, like I said I'm not totally up on all the variations.

-Ken
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Fink and 'sh'
      • From: Doug McNutt <email@hidden>
References: 
 >Re: Fink and 'sh' (From: Brennan <email@hidden>)

  • Prev by Date: Re: subtle gotcha in 10.3.3 Finder copying on networked disk
  • Next by Date: Re: subtle gotcha in 10.3.3 Finder copying on networked disk
  • Previous by thread: Re: Fink and 'sh'
  • Next by thread: Re: Fink and 'sh'
  • Index(es):
    • Date
    • Thread