Skip to content

Commit 548d095

Browse files
committed
- Add find.sh bash script that ignores extra directories when searching.
xet7 uses this a lot when developing. Thanks to xet7 !
1 parent 1683bcb commit 548d095

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

find.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Find text from all subdirectories
4+
# and ignore all temporary directories:
5+
# - node-modules = installed node modules
6+
# - .build = Wekan bundle that is combined from source. Do not edit these, these are deleted and recreated.
7+
# - .meteor = Meteor version, packages etc at .meteor/local
8+
# - .git = git history
9+
10+
# If less or more that 1 parameter, show usage.
11+
if (( $# != 1 )); then
12+
echo 'Usage: ./find.sh text-to-find'
13+
exit 0
14+
fi
15+
16+
find . | grep -v node_modules | grep -v .build | grep -v .meteor | grep -v .git | xargs grep --no-messages $1 | less

0 commit comments

Comments
 (0)