:: Re: [DNG] Remove xfce associated st…
Página Principal
Delete this message
Reply to this message
Autor: Alessandro Vesely
Data:  
Para: dng
Assunto: Re: [DNG] Remove xfce associated stuff?
On Sat 29/Mar/2025 17:06:48 +0100 tempforever wrote:
> Alessandro Vesely via Dng wrote:
>>
>>>   apt remove *xfce4*
>>
>> I didn't put quotes around *xfce*.  So, how does apt manage to
>> circumvent bash globbing?  Does it work with other shells too?
>
> I think a similar issue came up on this mailing list before.
> (bash) `apt remove *xfce4*` will remove packages containing 'xfce4' in
> the package name - UNLESS you have a file (or directory) containing that
> string (xfce4) in the current working directory.  To see bash handle the
> glob, try `touch zzzxfce4zzz; apt remove *xfce4*`



Right, there is a glob(7) man page that explains that traditional Unix behavior
was to expand *xfce* to an empty list if no matches were found. Later on POSIX
required that a wildcard pattern is left unchanged when it is syntactically
incorrect, or the list of matching pathnames is empty. So you have:

root:~# echo *xfce*
*xfce*

The old behavior can be resumed using the "nullglob" shell option (shopt).

root:~# bash -O nullglob
root:~# echo *xfce*

root:~#


Best
Ale
--