Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Segregating a Global Alias
- X-seq: zsh-users 18668
- From: Paul Johnson <paul@xxxxxxxx>
- To: zzapper <david@xxxxxxxxxxxxxx>
- Subject: Re: Segregating a Global Alias
- Date: Mon, 24 Mar 2014 18:11:38 +0000
- Cc: zsh-users@xxxxxxx
- In-reply-to: <XnsA2FAB51B6E85Bdavidrayninfocouk@80.91.229.13>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <XnsA2FA95D9D45BDdavidrayninfocouk@80.91.229.13> <CAH+w=7baCBR0KK+Uvhu8D53CPsVNvq4YSVsrbb35H1ReCHQZAA@mail.gmail.com> <XnsA2FAB2C8DE4F8davidrayninfocouk@80.91.229.13> <XnsA2FAB51B6E85Bdavidrayninfocouk@80.91.229.13>
On Mon, Mar 24, 2014 at 05:47:57PM +0000, zzapper wrote:
> zzapper <david@xxxxxxxxxxxxxx> wrote in
> news:XnsA2FAB2C8DE4F8davidrayninfocouk@80.91.229.13:
>
> > Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote in
> > news:CAH+w=7baCBR0KK+Uvhu8D53CPsVNvq4YSVsrbb35H1ReCHQZAA@xxxxxxxxxxxxxx:
> >
> >>
> >> (){ perl -ne 's/(<\/\w+>)/$1\n/g; print' < $1 > $1.txt } NF
> >>
> > inspired by this
> >
> > for f in NF ; perl -ne 's/(<\/\w+>)/$1\n/g; print' < $f > $f.txt
> >
> BTW this is perl one liner to put each XML tag on a newline. The input file
> is 10mb and perl takes just seconds, i gave up trying to do this with vim
> (-None) .
>
> But can anyone else trump Bart's or my attempt?
$ perl -pi.orig -e 's|</\w+>(?!\n)\K|\n|g' NF
perhaps?
--
Paul Johnson - paul@xxxxxxxx
http://www.pjcj.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author