• 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: LuKreme <email@hidden>
  • Date: Mon, 22 Mar 2004 01:33:59 -0700

On Mar 22, 2004, at 12:41 AM, Martin Orpen wrote:
on 21/3/04 11:49 pm, Brennan at email@hidden wrote:

I just installed 'LAME' with Fink. It works fine from the Terminal
('tcsh') but Applescript 'do shell script' is complaining that sh doesn't
know the command 'lame'.

Is there something special I should do to make this work?

As others have said already, you can specify the path to the command.

However, I'd like to know why the shell does not honour the users PATH?

Security? Let's say your script (or any script) did something using sudo and an executable like... for example, ls.

Let's say someone put a fake ls in their path that simply echoed every command passed to it to a log. Well, then they would have the sudo password logged.

Supposedly bash is the shell default, but I can't get this from AS:

set myPath to do shell script "env | grep PATH"

-->"PATH=/usr/bin:/bin:/usr/sbin:/sbin:/Users/martinorpen"

Anybody know where *this* path is specified?

/etc/profile or /etc/bashrc or /etc/csh.login?

That is the sh default path, and though sh and bash are equiv in most systems with bash installed, they behave differently depending on how they are invoked. Notice that the system paths are BEFORE the user's home, thus ensuring that system executable like ls or find (or sudo) are found BEFORE anything in the user's own home.

--
This is our music from the bachelor's den, the sound of loneliness turned up to ten. A harsh soundtrack from a stagnant waterbed and it sounds just like this. This is the sound of someone losing the plot, making out that they're OK when they're not. You're gonna like it, but not a lot. And the chorus goes like this...
_______________________________________________
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.


References: 
 >Re: Fink and 'sh' (From: Martin Orpen <email@hidden>)

  • Prev by Date: Re: Title in display dialog
  • Next by Date: Re: Unicode text and class URL
  • Previous by thread: Re: Fink and 'sh'
  • Next by thread: Re: Fink and 'sh'
  • Index(es):
    • Date
    • Thread