do shell script- sed conundrum
do shell script- sed conundrum
- Subject: do shell script- sed conundrum
- From: Jonathan Levi MD <email@hidden>
- Date: Fri, 17 Feb 2006 23:47:10 -0500
On Fri, 17 Feb 2006 13:47:58 -0700, Gnarlodious
<email@hidden> wrote:
Entity Eric Geoffroy spoke thus:
> Starting text
Title: King KongTitle: Godzilla
> Title: Mothra
[...]
In general, sed is a linewise command and not well suited to multilines,
although there are ways around that limitation.
I think you can do it cleanly and compactly with sed, if you allow yourself tr:
tr '\r' '\n' < yourfile |\
sed 's/\(.\)\(Title:\)/\1\n\2/g' |\
tr '\n' '\r'
HTH,
Jonathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden