Subject: Re: bug#26228: ls bug

From: Massimo Masotti <[email-masked]>
Date: Thu, 23 Mar 2017 20:41:22 +0000

Yes, this works.

Thank you very much and truly sorry for my mistake. Please excuse me.

Best Regards,
Massimo

On Thu, Mar 23, 2017 at 8:36 PM, Bishop Bettini <[email-masked]>
wrote:

> On Thu, Mar 23, 2017 at 3:57 PM, Massimo Masotti <
> [email-masked]> wrote:
>
>> Hi,
>> I have 12 pieces in my disk, from sda1 to sda12.
>>
>> This is the expected behavior:
>>
>> [root@max ~]# ls -l /dev/sda[1-9]
>> brw-rw---- 1 root disk 8, 1 Mar 23 14:39 /dev/sda1
>> brw-rw---- 1 root disk 8, 2 Mar 23 14:39 /dev/sda2
>> brw-rw---- 1 root disk 8, 3 Mar 23 14:39 /dev/sda3
>> brw-rw---- 1 root disk 8, 4 Mar 23 14:39 /dev/sda4
>> brw-rw---- 1 root disk 8, 5 Mar 23 14:39 /dev/sda5
>> brw-rw---- 1 root disk 8, 6 Mar 23 14:39 /dev/sda6
>> brw-rw---- 1 root disk 8, 7 Mar 23 14:39 /dev/sda7
>> brw-rw---- 1 root disk 8, 8 Mar 23 14:39 /dev/sda8
>> brw-rw---- 1 root disk 8, 9 Mar 23 14:39 /dev/sda9
>>
>> The following instead seems to me a bug:
>>
>> [root@max ~]# ls -l /dev/sda[1-12]
>> brw-rw---- 1 root disk 8, 1 Mar 23 14:39 /dev/sda1
>> brw-rw---- 1 root disk 8, 2 Mar 23 14:39 /dev/sda2
>>
>
> Don't blame ls, that's your shell globbing: [] denotes a range of single
> characters. [a-z], [0-9], etc. If you're using bash, you might want {1..12}
> (extended range expansion). See also http://www.tldp.org/LDP/
> abs/html/globbingref.html
>