bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mkdir - Command


From: Eric Blake
Subject: Re: mkdir - Command
Date: Mon, 16 Nov 2009 07:16:36 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Stefan Menne on 11/16/2009 7:10 AM:
> Hello,
> 
> The Commands  ls (and others) and mkdir interpret Wildcard in different 
> ways:

No, they don't interpret wildcards at all.  Globbing is a function of the
shell, performed prior to ls or mkdir invocation.

> 
> ->   ls    fil*/te*/file 

The shell ends up executing:

ls file/text/file

so ls never saw the wildcard

> 
> ->  mkdir  fi*/te*/directory

fi*/te*/directory doesn't exist at the time of the shell globbing, so
there is nothing to expand, so the shell ends up calling:

mkdir "fi*/te*/directory"

but since the parent directory fi* does not exist, mkdir must fail.

This is not a bug, but a misunderstanding on your part about how shell
globbing works.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksBXsQACgkQ84KuGfSFAYALygCfer9Sx+fgm4Goa0SuwhrBwlxJ
G+8AoIAEfCHaS1QlbbOYFSGUDkteiiEc
=coLJ
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]