From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6020 invoked by alias); 1 Aug 2011 13:24:57 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16178 Received: (qmail 13141 invoked from network); 1 Aug 2011 13:24:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at np.by designates 91.149.189.205 as permitted sender) From: ZyX Reply-To: zyx@np.by To: zsh-users@zsh.org Subject: Re: Why does this extended glob pattern fail? Date: Mon, 1 Aug 2011 17:24:31 +0400 User-Agent: KMail/1.13.7 (Linux/2.6.38.5-zen; KDE/4.6.3; x86_64; ; ) References: <1312194058.12893.2158087337@webmail.messagingengine.com> In-Reply-To: <1312194058.12893.2158087337@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2763936.V27Ln5DUlG"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201108011724.32006@-zyx> --nextPart2763936.V27Ln5DUlG Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Reply to message =ABRe: Why does this extended glob pattern fail?=BB,=20 sent 14:20:58 01 August 2011, Monday by Ronald Fischer: > Actually, this does not work either. Instead, I have to write >=20 > cp $from/^*.(log|png) $dest >=20 > The reason is that ^ doesn't apply to the *whole* word, but only up to > the first '/'. There is also a ~ that applies to the whole pattern, but in this case you w= ill=20 have to write `$from/*~$from/*.(log|png)'. Original message: > On Wed, 27 Jul 2011 15:32 +0100, "Stephane Chazelas" >=20 > wrote: > > or better, use globbing alternate operator rather than brace > > expansion: > >=20 > > cp ^$from/*.(log|png) $dest >=20 > Actually, this does not work either. Instead, I have to write >=20 > cp $from/^*.(log|png) $dest >=20 > The reason is that ^ doesn't apply to the *whole* word, but only up to > the first '/'. >=20 > Thanks for helping! >=20 > Ronald --nextPart2763936.V27Ln5DUlG Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iEYEABECAAYFAk42qQ8ACgkQTFU0h8DxG4NwogCcCVbcXlXvHs4wTQTr8VAU326S FcQAn3DOLOBggF1UjFSuz1s4m4GHWJtH =R6EM -----END PGP SIGNATURE----- --nextPart2763936.V27Ln5DUlG--