Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: kinda perl grep ?
- X-seq: zsh-users 10001
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx (Zsh users list)
- Subject: Re: kinda perl grep ?
- Date: Tue, 07 Mar 2006 15:44:51 +0000
- In-reply-to: <440DA84E.7010900@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <440DA84E.7010900@xxxxxxxxxxxxxxxxxx>
> Hi all,
> in perl , i write :
>
> @files = grep { chomp; -f $_ } `dpkg -L libapache2-mod-perl2`
>
> in zsh :
>
> for f ( $(dpkg -L libapache2-mod-perl2 ) ) { [[ -f $f ]] && files+=$f }
>
> i dream about something like
>
> files=( ${$(dpkg -L libapache2-mod-perl2):[[ -f $_ ]]} )
files=( ${^$(dpkg -L libapache2-mod-perl2)}(N.) )
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
Messages sorted by:
Reverse Date,
Date,
Thread,
Author