bug-coreutils
[Top][All Lists]
Advanced

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

bug#69261: 'ls' : --ignore does not apply on FILEs selection


From: Paul Eggert
Subject: bug#69261: 'ls' : --ignore does not apply on FILEs selection
Date: Sun, 18 Feb 2024 22:45:00 -0800
User-agent: Mozilla Thunderbird

On 2024-02-18 14:07, Mathias MICHEL via GNU coreutils Bug Reports wrote:

Is it expected that --ignore arg does not apply on globbed FILE ?

Yes. --ignore is about what 'ls' finds in directories, not about command-line arguments.

My goal is to avoid using grep or complex find args:
> ~/.ssh :: ls id_ed* | grep -v "\.pub$" > id_ed25519 id_ed25519.local 
id_ed25519_ori

Try this:

ls --hide='[^i]*' --hide='i[^d]*' --hide='id[^_]*' --hide='id_[^e]*' --hide='id_e[^d]*' --hide='*.pub'

Admittedly ugly, but does the job.





reply via email to

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