Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Segregating a Global Alias
- X-seq: zsh-users 18671
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Segregating a Global Alias
- Date: Mon, 24 Mar 2014 18:56:56 -0700
- In-reply-to: <140324153628.ZM4798@torch.brasslantern.com>
- 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> <140324153628.ZM4798@torch.brasslantern.com>
On Mar 24, 3:36pm, Bart Schaefer wrote:
}
} perl -pe '$. == 1 && open STDOUT,"> $ARGV.txt"; s/(<\/\w+>)/$1\n/g' NF
}
} That'll work for a whole list of files just like the "for" loop.
Phil reminds me off-list that $. is not automatically reset when the
value of $ARGV changes, so for multiple files you actually need:
perl -pe '$. == 1 && open STDOUT,"> $ARGV.txt";
s/(<\/\w+>)/$1\n/g;
close ARGV if eof;' NF
which might make this answer less appealing.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author