GNU bug report logs -
#22433
mkdir bug (?)
Previous Next
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.
Full log
Message #12 received at 22433-done <at> debbugs.gnu.org (full text, mbox):
[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)]
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.