Re: Shell expansion of * and hidden files

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

 



Robert P. J. Day wrote:
> it's a popular puzzle to come up with a glob that matches all 
> hidden thingies, without matching "." or "..".  and the solution is 
> ...
> 
> $ echo .[!.]*

Andre Speelmans objected:
> But this would miss the file ..test or any other which starts with two or more
> dots.
> 
> And I have to admit I don't know which glob would match all :(

Try
echo .[!.]* ..?*
which should overcome that ojection. It even handles ".. ".

Now the next objection to that glob (er, technically, those globs) is
that they don't necessarily return files in the local collating
sequence...

Anyone? ;-)

james.
-- 
E-mail address: james@ | "OPENING LINES OF THE 23RD PSALM
westexe.demon.co.uk    | Original version:
                       | The Lord is my Shepherd, I'll not want."
                       |     -- "The Independent" thinks David spoke English



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

  Powered by Linux