From owner-freebsd-questions@FreeBSD.ORG Sun Oct 23 12:43:23 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E78216A41F for ; Sun, 23 Oct 2005 12:43:23 +0000 (GMT) (envelope-from mtmi@o2.pl) Received: from poczta.o2.pl (mx.go2.pl [193.17.41.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id F132143D48 for ; Sun, 23 Oct 2005 12:43:22 +0000 (GMT) (envelope-from mtmi@o2.pl) Received: from [10.50.93.21] (unregister185207219081.c207.msk.pl [81.219.207.185]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by poczta.o2.pl (Postfix) with ESMTP id 70A7F137909 for ; Sun, 23 Oct 2005 14:43:18 +0200 (CEST) From: =?utf-8?q?Micha=C5=82_Mas=C5=82owski?= To: freebsd-questions@freebsd.org Date: Sun, 23 Oct 2005 14:43:05 +0200 User-Agent: KMail/1.8 References: <43518497.6050505@mykitchentable.net> In-Reply-To: <43518497.6050505@mykitchentable.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510231443.06819.mtmi@o2.pl> Subject: Re: Bash Pattern Matching Syntax X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2005 12:43:23 -0000 > I want to list the files in a directory that end in ".jpg" irregardless > of case. Thus after reading the bash man page, it seems I should be > able to issue a command something along the lines of "ls [*.[JjPpGg]]" > or "ls *.[JjPpGg]" but neither of these work and return a "No such file > or directory" message. I've also tried various ways of escaping the > '*' and '." but that didn't help either. However "ls *[JjPpGg]" does > work by listing the files. However I want to match the "." before "jpg" > as well. What is the correct syntax for what I'm trying to do? > > Thanks, > > Drew ls *.{JPG,jpg} or ls *.{J,j}{P,p}{G,g}