Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: field splitting with empty fields
- X-seq: zsh-users 12142
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: field splitting with empty fields
- Date: Tue, 30 Oct 2007 08:02:38 +0000
- In-reply-to: <20071030042048.GA32506@xxxxxxxxxxx>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20071029235835.GA29356@xxxxxxxxxxx> <071029171355.ZM28438@xxxxxxxxxxxxxxxxxxxxxx> <20071030042048.GA32506@xxxxxxxxxxx>
On Tue, Oct 30, 2007 at 12:20:48AM -0400, Clint Adams wrote:
> On Mon, Oct 29, 2007 at 05:13:55PM -0700, Bart Schaefer wrote:
> > print ${list//:/$'\n'}
> >
> > ??
>
> Okay, I asked a stupid question.
>
> I want the line split into words according to fields which may be
> blank. Right now I'm substituting :x: for :: and then removing
> the x's to ensure that the array value match up to the proper
> indices. This seems suboptimal.
IFS=:
print -rl -- $=list
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author