Subject: bug#39135: Globbing with numbers does not allow me to specify order

From: Bernhard Voelker <[email-masked]>
Date: Tue, 14 Jan 2020 22:23:14 +0100

tag 39135 notabug
close 39135
stop

On 2020-01-14 09:44, Antti Savolainen wrote:
> When doing a shortcut to unmount in a specific order, I am unable to
> specify order with angle brackets. For example using 'umount /dev/sda[132]'
> will result in the system unmounting them in numerological order. First 1
> then 2 and finally 3. What I need it to do is to first unmount 1, then 3
> and finally 2. It would be nice for the glob to respect the order of
> numbers that it was given.

Thanks for the report, but you reached the GNU coreutils mailing list
while umount is part of util-linux, and the globbing you're referring to
is done by your shell.

Therefore, you're better off asking at the mailing lists of those packages.
As this is not a bug in coreutils, I'm marking it as such, and close this
issue in our bug tracker.

A little hint:
if your shell knows brace expansion "{...}", then you could use that
instead of file globbing with "[...]".  The following does this with
'echo' put in front of the command in order to see what would be
executed:

  $ echo umount /dev/sda{1,3,2}
  umount /dev/sda1 /dev/sda3 /dev/sda2

Have a nice day,
Berny