Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: something simple (I hope)
- X-seq: zsh-users 6436
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: ZSH User List <zsh-users@xxxxxxxxxx>
- Subject: Re: something simple (I hope)
- Date: Mon, 4 Aug 2003 17:38:10 +0200
- Cc: Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>
- In-reply-to: <20030804151216.GB25043@xxxxxxxxxxxxxxxxx>
- Kreccount: 1
- Mail-followup-to: ZSH User List <zsh-users@xxxxxxxxxx>, Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: KasCada Gbr
- References: <20030804143351.GA14857@xxxxxxxxx> <20030804151216.GB25043@xxxxxxxxxxxxxxxxx>
> > I want to put all files that match the regex pattern
> > "^/var/tmp/exec\.[0-9]+$"
> > into a list that I can then use in a foreach loop.
> for i in /var/tmp/exec.[0-9][0-9]* ; do echo $i ; done
Thanks but I really need a list (with a name).
Actually in the meantime I found out how to do that:
files=(/var/tmp/exec.[[:digit:]]*)
But what is still bugging me is that this also matches files like
/var/tmp/exec.01234.something
I can't figure out how to tell zsh that there shouldn't be anything _after_
digits. What is the zsh-equivalent of a $ in regular expressions?
Thanks again,
Andy.
--
http://peru.spiegl.de Our project
http://radiomaranon.org.pe Radio Marañón, Jaén, Perú
o _ _ _
------- __o __o /\_ _ \\o (_)\__/o (_) -o)
----- _`\<,_ _`\<,_ _>(_) (_)/<_ \_| \ _|/' \/ /\\
---- (_)/ (_) (_)/ (_) (_) (_) (_) (_)' _\o_ _\_v
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What do prisoners use to call each other?
Cell phones.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author