Re: Shell expansion of * and hidden files

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

 



I wrote that it's not easy to come up with a glob pattern that matches
all hidden and non-hidden files without matching the special cases
of "." and "..".

And Ulrich Drepper replied:
> The most straight-forward way is to tell the shell you want the dot files:
> 
> $ ls -a
> ./  ../  .uu
> $ echo *
> *
> $ shopt -s dotglob
> $ echo *
> .uu
> $ shopt -u dotglob
> $ echo *
> *
> 
And, as long as you're using bash, it works! (Am I showing my time on
other Unices here?)

Wow, thanks. I didn't know you followed this list...

James.
-- 
E-mail address: james@ | "Come on, son, give us your best shot."
westexe.demon.co.uk    |     -- Goliath



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

  Powered by Linux