Re: do Shell Script & shell Script
Re: do Shell Script & shell Script
- Subject: Re: do Shell Script & shell Script
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 23 Oct 2006 10:21:54 -0400
OK, I inadvertently sent a chain of stream-of-consciousness replies
directly to Kim and not to the list, which is just as well for most of
you. :) Here's the upshot:
1. "do shell script" defaults to a "shell" of /bin/sh, which doesn't
have process substitution, hence the need to invoke bash explicitly.
(tcsh also doesn't have process substitution, which is why it didn't
work in Andrew's Terminal session.)
2. /bin/sh on OS X (at least since Panther) is in fact bash in
"sh-compatible" mode - which, like vanilla sh, doesn't have process
substitution, so (1) still applies. However, *unlike* vanilla sh,
bash in compatibility mode has both the "source" command and
tilde-substitution. Which is why the "source ~/.profile" line worked.
3. A more compact way to achieve the desired result is to tell bash
on the command line that you want it to run the .profile, which you
can do via the --login option:
do shell script "bash --login -c 'ls >(ls)' "
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden