From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23487 invoked from network); 4 Aug 2003 15:58:01 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 4 Aug 2003 15:58:00 -0000 Received: (qmail 8639 invoked by alias); 4 Aug 2003 15:57:51 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6441 Received: (qmail 8629 invoked from network); 4 Aug 2003 15:57:51 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 4 Aug 2003 15:57:51 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [217.6.190.222] by sunsite.dk (MessageWall 1.0.8) with SMTP; 4 Aug 2003 15:57:51 -0000 Received: from karnickel.franken.de (localhost [127.0.0.1]) by karnickel.franken.de (8.12.9/8.12.9) with ESMTP id h74FuYwc000355 for ; Mon, 4 Aug 2003 17:56:34 +0200 (CEST) Received: (from uucp@localhost) by karnickel.franken.de (8.12.9/8.12.2/Submit) with UUCP id h74FuYMp000354 for zsh-users@sunsite.dk; Mon, 4 Aug 2003 17:56:34 +0200 (CEST) (envelope-from jean-luc@picard.franken.de) Received: by picard.franken.de (Postfix, from userid 1001) id 8C1DB5BB28; Mon, 4 Aug 2003 17:51:30 +0200 (CEST) Date: Mon, 4 Aug 2003 17:51:30 +0200 From: Thomas =?iso-8859-1?Q?K=F6hler?= To: ZSH User List Subject: Re: something simple (I hope) Message-ID: <20030804155130.GA2199@picard.franken.de> Mail-Followup-To: ZSH User List References: <20030804143351.GA14857@spiegl.de> <20030804151216.GB25043@picard.franken.de> <20030804153810.GA17793@spiegl.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <20030804153810.GA17793@spiegl.de> X-Operating-System: Linux picard 2.4.18 X-Editor: VIM - Vi IMproved 6.2 http://www.vim.org/ X-IRC: tirc; Nick: jeanluc X-URL: http://jeanluc-picard.de/ User-Agent: Mutt/1.5.4i --gKMricLos+KVdGMg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Andy Spiegl wrote [2003/08/04]: > > > 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. >=20 > > 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=3D(/var/tmp/exec.[[:digit:]]*) >=20 > But what is still bugging me is that this also matches files like > /var/tmp/exec.01234.something >=20 > I can't figure out how to tell zsh that there shouldn't be anything _afte= r_ > digits. What is the zsh-equivalent of a $ in regular expressions? I have no idea for the "$" problem, but have you tried this? files=3D(/var/tmp/exec.<->) ^^^ <[n]-[m]> matches any number in the range n to m, both of which are optional... > Thanks again, > Andy. Ciao, Thomas --=20 Thomas K=F6hler Email: jean-luc@picard.franken.de | LCARS - Linux <>< WWW: http://jeanluc-picard.de | for Computers IRC: jeanluc | on All Real PGP public key available from Homepage! | Starships --gKMricLos+KVdGMg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/LoECTEYXWMJlHuYRApTfAKCjWgkMOozLznUusrKLm5C83WR6VQCfdr5S pxYc+hzIjP7TAkZ88n9VmSU= =zY55 -----END PGP SIGNATURE----- --gKMricLos+KVdGMg--