From owner-freebsd-questions@FreeBSD.ORG Sat Oct 15 22:37:18 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 3DE3816A41F for ; Sat, 15 Oct 2005 22:37:18 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from relay04.roc.ny.frontiernet.net (relay04.roc.ny.frontiernet.net [66.133.182.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id B754D43D48 for ; Sat, 15 Oct 2005 22:37:17 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from filter09.roc.ny.frontiernet.net (filter09.roc.ny.frontiernet.net [66.133.183.76]) by relay04.roc.ny.frontiernet.net (Postfix) with ESMTP id AEBD6358248 for ; Sat, 15 Oct 2005 22:37:16 +0000 (UTC) Received: from relay04.roc.ny.frontiernet.net ([66.133.182.167]) by filter09.roc.ny.frontiernet.net (filter09.roc.ny.frontiernet.net [66.133.183.76]) (amavisd-new, port 10024) with LMTP id 18094-06-17 for ; Sat, 15 Oct 2005 22:37:16 +0000 (UTC) Received: from blacklamb.mykitchentable.net (67-51-164-214.dsl1.elk.ca.frontiernet.net [67.51.164.214]) by relay04.roc.ny.frontiernet.net (Postfix) with ESMTP id 7126A358182 for ; Sat, 15 Oct 2005 22:37:12 +0000 (UTC) Received: from [192.168.1.3] (unknown [192.168.1.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by blacklamb.mykitchentable.net (Postfix) with ESMTP id B2A24154818 for ; Sat, 15 Oct 2005 15:37:11 -0700 (PDT) Message-ID: <43518497.6050505@mykitchentable.net> Date: Sat, 15 Oct 2005 15:37:11 -0700 From: Drew Tomlinson User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-2.3.2 (20050629) at filter09.roc.ny.frontiernet.net Subject: 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: Sat, 15 Oct 2005 22:37:18 -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 -- Visit The Alchemist's Warehouse Magic Tricks, DVDs, Videos, Books, & More! http://www.alchemistswarehouse.com