Created
July 10, 2018 16:26
-
-
Save donwilson/502b2f3b65e273a633c9454c689b48ac to your computer and use it in GitHub Desktop.
Grep and ignore _old/ and *CST$ files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CWD=$(pwd) | |
ARROW="-" | |
echo "" | |
echo "====================================" | |
echo "== Finding: $1" | |
echo "== - in: $CWD/" | |
echo "== - skipping paths that match '_old/|CST$'" | |
echo "==" | |
#working: ack --color --sort-files --match "$1" "$CWD" | |
ack -v -g '_old/|CST$' "$CWD" | ack --color --sort-files --match "$1" -x | |
#grep --color -E -nr '$1' . | grep --color -E '|$' | |
echo "==" | |
echo "====================================" | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment