Re: Sed replace oneline nogo in Applescript
Re: Sed replace oneline nogo in Applescript
- Subject: Re: Sed replace oneline nogo in Applescript
- From: Gnarlodious <email@hidden>
- Date: Tue, 10 Feb 2004 13:11:36 -0700
Entity BJ Terry spoke thus:
>
In order to address 2 in your
>
script, all you have to do is use "3" instead
Hey! That works! You are smart!
>
this is confusing.
And you are the master of understatement.
Thanks for the explanation.
-- Gnarlie
>
On Feb 10, 2004, at 7:00 AM, Gnarlodious wrote:
>
>
> Yes, BJ, your assumptions are correct.
>
>
>
> It works when sent as a single command call, like what you did.
>
> But when I concatenate the middle command it simply will not work:
>
>
>
> do shell script "sed " & ,
>
> "-e 's|<HR>|<BR>|' " & ,
>
> "-e '2s|<H3>\\(.*\\)<\\/H3>|<h3><a href=\"\\.\\/\">\\1</a></h3>|'
>
> " & ,
>
> "-e '1N;s|</A>\\(\\n<A\\)|</A> \\• \\1|;P;$!N;D' " & ,
>
> flipPOSIX & ">" & flopPOSIX
>
>
>
> Removing the "2" operates on all lines in the file.
>
>
>
> I can't figure this out, maybe it's a buffering issue?
>
>
>
> OTOH, the output string when pasted in Terminal doesn't work either,
>
> so that
>
> excuses Applescript.
>
>
>
> Thanks for the help.
>
>
>
> -- Gnarlie
_______________________________________________
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.