4 ms·
I am not someone who complains about "stop piping cats" but using '-e' with grep is a lot quicker and easier to read. This: grep -v 'test/' | grep -v 'test
by dfc 3y ago
I am not someone who complains about "stop piping cats" but using '-e' with grep is a lot quicker and easier to read. This:
grep -v 'test/' | grep -v 'tests/' | grep -v idlelib | grep -v turtledemo
Becomes:
grep -ve 'test/' -e 'tests/' -e idlelib -e turtledemo
- yunohn 3y agoTo be fair, the advantage of doing separate greps is working iteratively and drilling down on what you want.
- knodi123 3y agonot this? grep -ve 'test/|tests/|idlelib|turtledemo'
- simonw 3y agoThanks, that's a useful tip.
- st0le 3y agoAlso since ripgrep is already installed "grep -v" can be replaced with "rg -v"