Bash globbing files only?

Todd Zullinger tmz at pobox.com
Wed Jan 31 03:18:16 UTC 2007


Cameron Simpson wrote:
> On 30Jan2007 15:24, Jacques B. <jjrboucher at gmail.com> wrote:
[...]
> | The find command is more robust as it will properly deal with
> | filenames with spaces.  Not to mention find will also yield hidden
> | files (i.e. .file) whereas the above won't.
> 
> This depends what you want. But yes. But you can do this:
> 
>   for f in .* *
>   do
>     case "$f" in . | .. ) continue ;; esac
> 
> which gets it all.

With bash you can also use "shopt -s dotglob" to allow * to match
filenames beginning with a dot.  I find that one handy. :)

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
======================================================================
Remember, there's a big difference between kneeling down and bending
over.
    -- Frank Zappa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070130/1aed7ecc/attachment-0001.sig>


More information about the fedora-list mailing list