On Mon, 14 Mar 2005 21:54:01 +0600, Haran Shivanan
<shivanan@xxxxxxxxxxxxxxxxx> wrote:
On Mon, 2005-03-14 at 11:50 +0530, gopu.bhaskar@xxxxxxxxx wrote:
Reason is the shell expanding * getting expanded to all the file namesSlightly OT:
in the dir and crossing the max limit of number of args.
I kind of find it annoying how globbing is done at the shell level and
not at the program level.
Yes, this makes it easier to write your program but at the same time,
this causes all sorts of unexpected results.
My favorite is how someone's directory had a file called "-r" (created
accidently by giving incorrect arguments to some other program) and the
user executed "rm *".
The shell expands the "*" and "-r" is treated as a command-line argument
causing rm to recursively delete everything.