Re: Inconsistancy Between Do Shell Script and Terminal?
Re: Inconsistancy Between Do Shell Script and Terminal?
- Subject: Re: Inconsistancy Between Do Shell Script and Terminal?
- From: Christopher Nebel <email@hidden>
- Date: Fri, 14 Jan 2005 17:07:37 -0800
On Jan 13, 2005, at 5:42 AM, de Runtz, Lars wrote:
It is important to declare the shell environment, at the top of shell
scripts.
#!/bin/bash
for the bourne again shell. The do shell script may actual default to
another similar environment, like tcsh. Different MacOS's may default
to different shells, too.
Not as far as "do shell script" is concerned, it won't. Quoting from
TN2065 again: "do shell script always uses /bin/sh to interpret your
command, not your default shell, which Terminal uses." While it's true
that your default shell may be anything, and it's true that the default
for new users has changed between releases, that only affects Terminal,
not "do shell script". Technically, sh is really bash running in sh
emulation mode.
I think I put my #!/bin/bash in my scripts because I encountered funny
problems, and declaring it solved them.
Most likely you were trying to use bash-isms that aren't supported
(correctly) in sh mode.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden