GNU bug report logs - #64607
parted command is not support Brace Expansion in bash shell

Previous Next

Package: parted;

Reported by: Nguyen Trung Hieu <thaygiaoth <at> gmail.com>

Date: Fri, 14 Jul 2023 07:33:02 UTC

Severity: normal

Done: "Brian C. Lane" <bcl <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


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

From: bill-auger <bill-auger <at> peers.community>
To: Nguyen Trung Hieu <thaygiaoth <at> gmail.com>
Cc: 64607 <at> debbugs.gnu.org
Subject: Re: bug#64607: parted command is not support Brace Expansion in
 bash shell
Date: Fri, 14 Jul 2023 04:10:49 -0400
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 ;




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.