grep is always recursive

Matthew Flaschen matthew.flaschen at gatech.edu
Tue Feb 3 01:40:27 UTC 2009


Cameron Hutchison wrote:
>> It's not.  Yes, you can make a good argument that it only breaks "bad"
>> scripts like the one above.  But that's still not acceptable.  Scripts
>> that depend on standard well-defined behavior can't just stop working.
> 
> bash already has shell options for dotglob, extglob, failglob,
> nocaseglob and nullglob. Adding a dashglob option isn't going to break
> anything.

Does anyone use those options?  Particularly, do the newbies surprised
by how UNIX command lines work use them?

> I acknowledge that there is some risk. I don't think it's enough to
> worry about, but even then you could just have bash default to dashglob
> for interactive shells, leaving the default behaviour for scripts.

I think by and large bash interactive also works as a compliant sh.
When it doesn't, this can be confusing.

Matt Flaschen




More information about the ubuntu-users mailing list