Re:Why "ls *.c" is at least dumb, and possibly dangerous
by bobbyi on Friday October 09, 2009 @02:08AM
(#870731)
It's so that every script in the world doesn't have to duplicate the logic for how to interpret globs. They inevitably won't end up doing it exactly the same way.
Re:Why "ls *.c" is at least dumb, and possibly dangerous
by wvenable on Friday October 09, 2009 @12:36PM
(#871758)
Shouldn't that be part of the OS API? Why call me with 1,000 arguments, when I could call an API with the wildcard and get the 1,000 files back? My poor argv can't handle it the other way.
I periodically have to cleanup abandoned and overflowing unix mailboxes where every message is it's own file. You'd think a simple "rm *" would work, but it doesn't, because you get an error message saying that there are "too many arguments". From my perspective there's one argument, the asterisk. Very confusing. I end up having to use xargs to get it work. Seems like a poor design.