Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
kinda perl grep ?
- X-seq: zsh-users 9999
- From: Marc Chantreux <marc.chantreux@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: kinda perl grep ?
- Date: Tue, 07 Mar 2006 16:35:42 +0100
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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 $_ ]]} )
or something like
arraygrep '-f $_ ' $(dpkg -L libapache2-mod-perl2)
someone to make the dream come true ?
regards
mc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author