[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: default/simple globbing
From: |
#!microsuxx |
Subject: |
Re: default/simple globbing |
Date: |
Wed, 27 Nov 2024 14:01:17 +0100 |
.. not spaces safe , but dev sys name usually doesnt have spaces
On Wed, Nov 27, 2024, 1:58 PM #!microsuxx <fxmbsw7@gmail.com> wrote:
> ls
> 2-3 2-3.1 2-3:1.0 usb2
> ~/tt $ a=( *-* ) a=( ${a[@]/*[:.]*} ) ; declare -p a
> declare -a a=([0]="2-3")
>
> On Wed, Nov 27, 2024, 12:56 PM lacsaP Patatetom <patatetom@gmail.com>
> wrote:
>
>> hi,
>>
>> I try to display only part of the `/sys/bus/usb/devices/` folder with `ls
>> /sys/bus/usb/devices/*-*[!.:]*` or `ls /sys/bus/usb/devices/*-*[^.:]*` but
>> it doesn't subtract entries with a dot or colon in their name (only usb
>> entries are removed).
>>
>> if it's possible, what is the correct expression to use without having to
>> activate extended globbing ?
>>
>> regards, lacsaP.
>>
>> $ ls /sys/bus/usb/devices/
>> ...
>> /sys/bus/usb/devices/2-3
>> /sys/bus/usb/devices/2-3.1
>> /sys/bus/usb/devices/2-3:1.0
>> /sys/bus/usb/devices/usb2
>> ...
>>
>> $ ls /sys/bus/usb/devices/*-*[!.:]*
>> ...
>> /sys/bus/usb/devices/2-3
>> /sys/bus/usb/devices/2-3.1
>> /sys/bus/usb/devices/2-3:1.0
>> ...
>>
>
- default/simple globbing, lacsaP Patatetom, 2024/11/27
- Re: default/simple globbing, #!microsuxx, 2024/11/27
- Re: default/simple globbing,
#!microsuxx <=
- Re: default/simple globbing, lacsaP Patatetom, 2024/11/27
- Re: default/simple globbing, Tapani Tarvainen, 2024/11/27
- Re: default/simple globbing, Andreas Kähäri, 2024/11/27
- Re: default/simple globbing, lacsaP Patatetom, 2024/11/28
- Re: default/simple globbing, #!microsuxx, 2024/11/28
- Re: default/simple globbing, Zachary Santer, 2024/11/28
- Re: default/simple globbing, lacsaP Patatetom, 2024/11/29
Re: default/simple globbing, Tapani Tarvainen, 2024/11/27
Re: default/simple globbing, Chris Elvidge, 2024/11/28