Re: strange behaviour in search for \n
Re: strange behaviour in search for \n
- Subject: Re: strange behaviour in search for \n
- From: Charles Arthur <email@hidden>
- Date: Thu, 1 Jul 2004 19:35:18 +0100
On Thu, 01 Jul 2004 12:38:42 +0100 Nigel Smith <email@hidden> wrote:
..(I wrote)
>
> However if (in order not to have a dummy file that I write and read) I
>
> include the curl command as part of "do shell script" and put the output
>
> straight into a variable in the script, and then search using "</b>\n" and
>
> "\n</font>" as the start and end points, it fails. I get an empty list for
>
> the output of the search - my subroutine's way of saying "no such thing
>
> here".
>
>
Probably the result of "do shell script"'s autmatic line ending conversion,
>
which is on by default.
Guh. Didn't know about *that*. What a truly sneaky gotcha. Of course SE
can't show you if a new line is a CR or LF..
>
Try:
>
>
set myVar to do shell script "whatever" altering line endings false
>
>
...instead.
>
>
HTH,
Sure it wil. Thanks also to Emmanuel for that.
Charles
--
----------------------------
http://www.ukclimbing.com : 1200+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________
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.