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

Regular expression matching - how to ?



Hello,
is it possible to do a regular expression match in Z-shell without
invoking external programs

what I would like to do is

for $f in *; do
  if ( [[ `file $f` == "/bin/[a-z]* *script" ]] ); then
    ....
  fi
done

but unfortunately  ==  is not like   ~= in perl.
So what can be done (using perl from the beginning?)

Thanks for any hints,
Helmut Jarausch.





Messages sorted by: Reverse Date, Date, Thread, Author