help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: default/simple globbing


From: Chris Elvidge
Subject: Re: default/simple globbing
Date: Thu, 28 Nov 2024 13:56:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4

On 27/11/2024 at 11:55, lacsaP Patatetom 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
...


ls --hide='*:*' --hide='*.*' -l /sys/bus/usb/devices/


--
Chris Elvidge
England




reply via email to

[Prev in Thread] Current Thread [Next in Thread]