GNU bug report logs - #22433
mkdir bug (?)

Previous Next

Package: coreutils;

Reported by: <Laurent.Schall <at> emerson.com>

Date: Fri, 22 Jan 2016 15:53:03 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22433 in the body.
You can then email your comments to 22433 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#22433; Package coreutils. (Fri, 22 Jan 2016 15:53:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to <Laurent.Schall <at> emerson.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 22 Jan 2016 15:53:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: <Laurent.Schall <at> emerson.com>
To: <bug-coreutils <at> gnu.org>
Subject: mkdir bug (?)
Date: Fri, 22 Jan 2016 12:52:50 +0000
[Message part 1 (text/plain, inline)]
The following command:
(cd ${IMAGE_MODIFIED_ROOTFS}; mkdir -p opt/chloride/{bin,etc,var,archive};)

Created the following:
[cid:image001.png <at> 01D1551C.2D04F580]

user <at> 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 bug-coreutils <at> gnu.org
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 <at> 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
Laurent.Schall <at> emerson.com<mailto:Darrel.Casey <at> emerson.com>
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

[Message part 2 (text/html, inline)]
[image001.png (image/png, inline)]

Added tag(s) notabug. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Fri, 22 Jan 2016 16:53:02 GMT) Full text and rfc822 format available.

Reply sent to Eric Blake <eblake <at> redhat.com>:
You have taken responsibility. (Fri, 22 Jan 2016 16:53:02 GMT) Full text and rfc822 format available.

Notification sent to <Laurent.Schall <at> emerson.com>:
bug acknowledged by developer. (Fri, 22 Jan 2016 16:53:03 GMT) Full text and rfc822 format available.

Message #12 received at 22433-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Laurent.Schall <at> emerson.com, 22433-done <at> debbugs.gnu.org
Subject: Re: bug#22433: mkdir bug (?)
Date: Fri, 22 Jan 2016 09:52:32 -0700
[Message part 1 (text/plain, inline)]
tag 22433 notabug
thanks

On 01/22/2016 05:52 AM, Laurent.Schall <at> emerson.com wrote:
> The following command:
> (cd ${IMAGE_MODIFIED_ROOTFS}; mkdir -p opt/chloride/{bin,etc,var,archive};)
> 
> Created the following:
> [cid:image001.png <at> 01D1551C.2D04F580]

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 <at> 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

[signature.asc (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Feb 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 124 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.