Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Per line ${..//..}
- X-seq: zsh-users 9566
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: Per line ${..//..}
- Date: Wed, 26 Oct 2005 13:26:42 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <EXCHANGE03J46SCzFJ3000081bb@xxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Peter Stephenson <pws@xxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20051026094047.GA658@DervishD> <EXCHANGE03kJJfYCank000081b9@xxxxxxxxxxxxxxxxxx> <20051026101529.GA834@DervishD> <EXCHANGE03J46SCzFJ3000081bb@xxxxxxxxxxxxxxxxxx>
Hi Peter :)
* Peter Stephenson <pws@xxxxxxx> dixit:
> DervishD wrote:
> > Unfortunately the original data is not in an array :( Will this
> > work?:
> >
> > olddata=(${(f)olddata))
> > olddata=(${olddata:#...})
>
> Yes, you should be able to combine them along the lines of
>
> ${${(f)olddata}:#...}
Thanks Peter, this works perfectly. Now I'm doing this:
olddata=(${${(f)olddata}:#...})
I still do the array conversion because this makes easier to find
individual lines afterwards (and I can refer to them by number, which
is something I want).
Thanks! :)
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author