Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

kinda perl grep ?



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