News for hackers. Stuff that matters.
Re:Why "ls *.c" is at least dumb, and possibly dangerous by GeoffWozniak on Thursday October 08, 2009 @09:23PM (#870394)
Dumb on whose behalf? If you need to know the inner workings of the shell in order to know that is "dumb" then I submit that in and of itself is dumb.
Re:Why "ls *.c" is at least dumb, and possibly dangerous by weaksauce on Thursday October 08, 2009 @09:48PM (#870425)
Apparently you have not been bitten by a filename expansion bug when shell scripting. This kind of thing is fairly common with bash and some of the other ones when dealing with files that have spaces/newlines/whatever. It boils down to learning and knowing your tools and how to work around their limitations.
Re:Why "ls *.c" is at least dumb, and possibly dangerous by rmaccloy on Thursday October 08, 2009 @09:53PM (#870436)
In this case, if you're not an expert with bash, a good rule of thumb would be to pipe your glob-expanded list of junk into perl -nle 'print' (or echo, or... etc) before running something destructive.

Every time. Until you're an expert.