Re: Weird reply in Tiger vs. Leopard....is this a bug?
Re: Weird reply in Tiger vs. Leopard....is this a bug?
- Subject: Re: Weird reply in Tiger vs. Leopard....is this a bug?
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 17 Jan 2008 19:10:06 -0500
No. Absolutely a bug. The echo command is irrelevant. The fact is,
if the output of any shell command includes a "\" followed by an "n",
the new AS will replace that sequence with a return character. This
is entirely new and incorrect behavior that has nothing to do with how
you generate the output in the first place, and therefore nothing to
do with the way echo treats backslash sequences in its parameters.
On 1/17/08, Axel Luttgens <email@hidden> wrote:
> On 17/01/08 18:13, Jim Skibbie wrote:
>
> > OK- After a couple of days trying to sort this out, I can confirm that the
> > response in Leopard for the do shell script at least for "echo" is
> > definitely different than in Tiger. See the script snippet below and the
> > resulting event logs. You'll see that Leopard, the script returns only 20
> > characters where in Tiger, the same script returns 24.
> >
> > [...]
> >
> > I reported this to Apple (bug# 5688436)
>
>
> I'm not sure one could really speak about a bug.
>
> On leopard, you can get Tiger's behavior back with:
>
> set arg to do shell script "shopt -u xpg_echo; echo " & quoted form
> of arg & " | ruby -p -e '$_.strip!'"
>
> Remember that "do shell script" runs "sh", not "bash" (even if the
> former is emulated by the latter); it's interesting to run:
>
> do shell script "set"
>
> and to notice, for example, "POSIXLY_CORRECT=y" in the output.
>
> I guess that, given the trends towards POSIX compliance, your bug report
> will be closed as "works as intended" even if, of course, such changes
> may sometimes lead to painful unsuspected results...
>
> Axel
> _______________________________________________
> 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/archives/applescript-users
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden