Re: Big bug in shell scripting in Applescript
Re: Big bug in shell scripting in Applescript
- Subject: Re: Big bug in shell scripting in Applescript
- From: "Zavatone, Alex" <email@hidden>
- Date: Thu, 04 Aug 2011 15:43:20 -0700
- Acceptlanguage: en-US
- Thread-topic: Big bug in shell scripting in Applescript
Yeah, I was testing in a multi line configuration and then created a simple case to show what happens. Right now, I trim the last char off of the result where I need to make sure the line endings are not altered and all is OK.
On Aug 4, 2011, at 5:37 PM, Mark J. Reed wrote:
> On Thu, Aug 4, 2011 at 6:24 PM, Zavatone, Alex <email@hidden> wrote:
>> I'm not sure that is correct. If you do not use "without altering line endings", the script runs fine.
>
> Only because of extra magic. In addition to turning embedded newlines
> into carriage returns, the normal 'do shell script' behavior also
> automatically removes a single *trailing* newline. Which works very
> well in combination with the fact that <<< adds one. Really, if you
> stick to single-line strings you won't have this difficulty. :)
>
> Unfortunately I don't know of a way to preserve that behavior without
> also preserving the carriage return translation.
>
> --
> Mark J. Reed <email@hidden>
This email message and any attachments are for the sole use of the intended recipient(s) and may contain information that is proprietary to U.S. Foodservice, Inc and/or its subsidiaries or otherwise confidential or legally privileged. If you have received this message in error, please notify the sender by reply, and delete all copies of this message and any attachments. If you are the intended recipient you may use the information contained in this message and any files attached to this message only as authorized by U.S. Foodservice. Files attached to this message may only be transmitted using secure systems and appropriate means of encryption, and must be secured using the same level password and security protection with which the file was provided to you. Any unauthorized use, dissemination or disclosure of this message or it's attachments is strictly prohibited.
_______________________________________________
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