GNU bug report logs -
#64607
parted command is not support Brace Expansion in bash shell
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64607 in the body.
You can then email your comments to 64607 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-parted <at> gnu.org
:
bug#64607
; Package
parted
.
(Fri, 14 Jul 2023 07:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nguyen Trung Hieu <thaygiaoth <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-parted <at> gnu.org
.
(Fri, 14 Jul 2023 07:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi all
ll /dev/sd{c,d,e} --> OK
parted /dev/sd{c,d,e} print --> NOT OK
[image: image.png]
Is it a bug or a feature still not available?
Is it possible add more codes for parted to support Brace Expansion in bash
shell?
Thank you very much!
[Message part 2 (text/html, inline)]
[image.png (image/png, inline)]
Information forwarded
to
bug-parted <at> gnu.org
:
bug#64607
; Package
parted
.
(Fri, 14 Jul 2023 08:12:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 64607 <at> debbugs.gnu.org (full text, mbox):
On Fri, 14 Jul 2023 10:17:58 +0700 Nguyen wrote:
> parted /dev/sd{c,d,e} print --> NOT OK
>
> Is it a bug or a feature still not available?
>
> Is it possible add more codes for parted to support Brace Expansion in bash
> shell?
not a bug; and not related to the shell - the feature simply does not exist
when you try that you will notice the "Usage" BNF
Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
that is a very specific form which specifies how to pass arguments - the way to
read that is to notice the square brackets [] and the ellipsis ...
square brackets denote optional arguments, and the ellipsis denote that multiple
of the preceding argument may be given - in this case, the command may take
only zero or one 'DEVICE' argument, but may have zero or multiple 'OPTION',
'COMMAND', and 'PARAMETERS'
so this is not related to shell brace expansion - the program expects only one
device argument - of course, someone could add that feature, but my guess is
that it was deemed undesirable for some reason, or it probably would have been
implemented long ago
to get the result you wanted, you could run it multiple times
$ for device in /dev/sd{c,d,e} ; do parted $device print ; done ;
Reply sent
to
"Brian C. Lane" <bcl <at> redhat.com>
:
You have taken responsibility.
(Fri, 14 Jul 2023 18:33:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Nguyen Trung Hieu <thaygiaoth <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 14 Jul 2023 18:33:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 64607-close <at> debbugs.gnu.org (full text, mbox):
On Fri, Jul 14, 2023 at 10:17:58AM +0700, Nguyen Trung Hieu wrote:
> Hi all
>
> ll /dev/sd{c,d,e} --> OK
>
> parted /dev/sd{c,d,e} print --> NOT OK
>
> [image: image.png]
>
> Is it a bug or a feature still not available?
>
> Is it possible add more codes for parted to support Brace Expansion in bash
> shell?
>
> Thank you very much!
brace expansion is a shell feature, parted can't support it because it
would imply operating on multiple disks at once :) eg. it is the same as
trying to run:
parted /dev/sdc /dev/sdd /dev/sde print
which doesn't make sense to parted. And even if it did, the only useful
command would be print. You wouldn't want to run mkpart on multiple
devices at once.
Brian
--
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 12 Aug 2023 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.