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

Re: 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 $_ ]]} )

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