Package: debian-reference
Severity: wishlist

On Fri, Dec 30, 2005 at 02:43:06AM +0100, Érsek László wrote:
> Dear Valued Mr. Osamu Aoki,
> 
> in the section
> 
> http://qref.sourceforge.net/Debian/reference/ch-tips.en.html#s-rm-rf-star
> http://www.debian.org/doc/manuals/reference/ch-tips.en.html#s-rm-rf-star
> 
> you may want to
> 
> 1) complement the "echo .[^.]*" example with "..?*" (since .[^.]* 
> doesn't match "..a", for example)
> 
> 2) mention the bash shell options "dotglob", "nullglob" and "extglob", 
> all explained in the bash manual page. I think "dotglob" is very 
> dangerous but can be convenient at times, "nullglob" is also very 
> dangerous for simple commands but can be very convenient in loops like 
> "for I in *; do :; done". I find "extglob" indispensable (maybe at times 
> combined with "dotglob") because of the negative pattern. For example, 
> compute a disk usage total for everything in your home directory 
> _except_ DIR1 and DIR2:
> 
> shopt -s dotglob extglob
> du -skc ~/!(DIR1|DIR2) | sort -rn
> 
> 
> Thank you for your attention.
> 
> Érsek, László
>

Well, it looks like quite advanced BASH only trick I never used, it is
quite interesting to keep it as reminder. 

Currently, I am limiting tricks to standard POSIX shell or ksh extension
but this seems to be BASH specific.  I will think about this later.

Osamu




Reply via email to