Re: OT: Default Shell in 10.2.6
Re: OT: Default Shell in 10.2.6
- Subject: Re: OT: Default Shell in 10.2.6
- From: Doug McNutt <email@hidden>
- Date: Mon, 4 Aug 2003 15:53:31 -0600
Not so off topic!
At 16:23 -0400 8/4/03, Jonathan Levi, M.D. wrote:
>
On Sun, 3 Aug 2003 14:18:01 -0600, Doug McNutt <email@hidden> wrote:
>
>
>But don't forget that (t)csh is no longer the default for AppleScript. It's bash now...
>
>
In Panther, I suppose. In 10.2.6, using my default shell, I get:
>
>
echo $SHELL
>
/bin/tcsh
<
http://developer.apple.com/technotes/tn2002/tn2065.html>
At 11:07 -0800 1/28/03, Christopher Nebel wrote:
>
On Tuesday, January 28, 2003, at 08:48 AM, Doug McNutt wrote:
>
>
>I have a script I use at every login and it ran fine this morning. The script is 100% tcsh and uses if - end if in a non dislexic fashion which would surely fail in bash. It' is executed with a "do shell script". It does begin with #!/bin/tcsh. ... [The tech note is] in direct conflict with my experiences.
>
>
No, it's not. You're saying you've got a file that's marked executable and starts with "#!/bin/tcsh", right? If you trigger it by saying 'do shell script "my-login-script"', then what actually happens is this:
>
>
1. do shell script launches sh.
>
2. sh looks at the input "my-login-script" and determines that it's the name of an executable file.
>
3. It executes the file.
>
4. The system notices the "#!" (aka shebang) line, sees that it should use /bin/tcsh to run the file, and does so.
>
>
Once again: "do shell script" always uses sh to interpret its input. What happens in the commands that input triggers depends on the commands.
Chris is right. (But the concept is still wrong.) If I add an echo $SHLVL to my #!/bin/tcsh script it reports "2". The point is that AppleScript ignores the user's default. A reasonable argument is that it is for portability of AppleScripts if a "portable AppleScript" is not an oxymoron.
I really would like my $HOME/.login to be executed when I log in to Aqua instead of only when executing Terminal or logging in remotely. Environment settings made that way can apply to applications. That is apparently not going to happen in Panther or anything else shy of Linux.
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
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.