Subject: bug#22433: closed (Re: bug#22433: mkdir bug (?))

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 22 Jan 2016 16:53:03 +0000

Your bug report

#22433: mkdir bug (?)

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
22433: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22433
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#22433: mkdir bug (?)
From: Eric Blake <[email-masked]>
To: [email-masked], [email-masked]
Date: Fri, 22 Jan 2016 09:52:32 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

tag 22433 notabug
thanks

On 01/22/2016 05:52 AM, [email-masked] wrote:
> The following command:
> (cd ${IMAGE_MODIFIED_ROOTFS}; mkdir -p opt/chloride/{bin,etc,var,archive};)
> 
> Created the following:

Thanks for the report.  Next time, please copy and paste text into your
email, rather than attaching an image, as it not only wastes bandwidth,
but it is also harder to reply to a screenshot.

Transcription of your image:

> total 12
> drwxrwxr-x 3 user user 4096 Jan 22 13:46 .
> drwxrwxr-x 3 user user 4096 Jan 22 13:46 ..
> drwxrwxr-x 2 user user 4096 Jan 22 13:46 {bin,etc,var,archive}
> user@user-virtual-machine:/tmp/ghmi/opt/chloride$

But I see no bug there - you asked for a file name with braces, and got one.

Oh, were you expecting brace expansion to happen?  Brace expansion is a
feature of some shells (such as bash), but is not required by POSIX and
is therefore not universal to all shells (such as dash).  I suspect you
normally use bash, but ran your command on a system where /bin/sh is dash.

To find out whether you are using a shell that does brace expansion, try:

echo {a,b}

If the result is "{a,b}", then you will get the same behavior for your
mkdir command.  If the result is "a b", then you will get four
directories due to brace expansion.  But remember that it is your shell,
not mkdir, that does brace expansion prior to mkdir ever seeing its
arguments.

As such, I'm closing this as not a bug, but feel free to add further
comments to this thread.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Subject: mkdir bug (?)
From: <[email-masked]>
To: <[email-masked]>
Date: Fri, 22 Jan 2016 12:52:50 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

The following command:
(cd ${IMAGE_MODIFIED_ROOTFS}; mkdir -p opt/chloride/{bin,etc,var,archive};)

Created the following:

user@user-virtual-machine:/tmp/ghmi/opt/chloride$ mkdir --help
Usage: mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.

Mandatory arguments to long options are mandatory for short options too.
  -m, --mode=MODE   set file mode (as in chmod), not a=rwx - umask
  -p, --parents     no error if existing, make parent directories as needed
  -v, --verbose     print a message for each created directory
  -Z, --context=CTX  set the SELinux security context of each created
                      directory to CTX
      --help     display this help and exit
      --version  output version information and exit

Report mkdir bugs to [email-masked]
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'mkdir invocation'
user@user-virtual-machine:/tmp/ghmi/opt/chloride$ mkdir --version
mkdir (GNU coreutils) 8.13
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.

Freundliche Grüße / Kind regards

Laurent Schall | HMI team leader - Senior software engineer R&D  | Chloride AC Power | Erlangen
Emerson Network Power GmbH | Niederlassung Erlangen | Schallershofer Str. 141 | 91056 Erlangen
T +49 9131 6300 130 | M +49 172 827 4292 | F +49 9131 6300 275
[email-masked]<mailto:[email-masked]>
www.EmersonNetworkPower.de<http://www.emersonnetworkpower.de/>

Folgen<http://www.emerson.com/sites/Network_Power/en-US/Products/GenericProduct/Pages/ConnectwithUs.aspx> Sie Emerson Network Power auf Facebook, Twitter und YouTube

Sitz der Gesellschaft: Lehrer-Wirth-Str.4, D - 81829 München
Geschäftsführer:  Andrew A. Asfour, Anton Conrad
Id.-Nr. De 131181345, WEEE DE90254228
Amtsgericht München, HRB 54650