Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Oct 2005 15:37:11 -0700
From:      Drew Tomlinson <drew@mykitchentable.net>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Bash Pattern Matching Syntax
Message-ID:  <43518497.6050505@mykitchentable.net>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43518497.6050505>