sharkdp / shell-functools

Functional programming tools for the shell
MIT License
1.19k stars 49 forks source link

Predicates negation #40

Closed hejcz closed 4 years ago

hejcz commented 4 years ago

Hi, Is there some way to negate predicates in filter? How can I express filtering out things that do not contain some string?

sharkdp commented 4 years ago

filter has a -n/--negate option:

❯ seq 10 | filter -n odd      
2
4
6
8
10
hejcz commented 4 years ago

Great, thanks!