[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: default/simple globbing
From: |
ikhxcsz7y xmbott |
Subject: |
Re: default/simple globbing |
Date: |
Thu, 28 Nov 2024 22:05:04 +0100 |
oh err
it works as long as last num before . or : is one number , not two or so
if u find such solutions interesting i can see for more alternatives
On Thu, Nov 28, 2024, 10:04 PM ikhxcsz7y xmbott <ikhxcsz7y@gmail.com> wrote:
> works with single digit numbers only , this code in last mail specific
>
> On Thu, Nov 28, 2024, 10:02 PM ikhxcsz7y xmbott <ikhxcsz7y@gmail.com>
> wrote:
>
>> match='/sys/bus/usb/devices/[0-9]*[!:.]?' ; for d in $match ; do [[ $d !=
>> "$match" ]] && echo $d ; done
>>
>> 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
>>> ...
>>>
>>
- Re: default/simple globbing, (continued)
- Re: default/simple globbing, Chris Elvidge, 2024/11/28
- Re: default/simple globbing, Lawrence Velázquez, 2024/11/28
- Re: default/simple globbing, Chris Elvidge, 2024/11/28
- Re: default/simple globbing, Lawrence Velázquez, 2024/11/28
- Re: default/simple globbing, #!microsuxx, 2024/11/28
- Re: default/simple globbing, Chris Elvidge, 2024/11/28
- Re: default/simple globbing, #!microsuxx, 2024/11/28
- Re: default/simple globbing, Greg Wooledge, 2024/11/28
Re: default/simple globbing, ikhxcsz7y xmbott, 2024/11/28