Re: Bash globbing files only?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cameron Simpson wrote:
> On 30Jan2007 15:24, Jacques B. <jjrboucher@xxxxxxxxx> 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

Attachment: pgpo4tFdS1UB6.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux