[script] add different find function

This commit is contained in:
Mathieu Maret 2012-08-29 13:32:42 +02:00
parent 6c911c38dc
commit 0632bf184a
1 changed files with 52 additions and 1 deletions

View File

@ -6,6 +6,57 @@ echo -e "${txtRED}searching for $@${txtdfl}";
#find . -not -iwholename "*.svn" -name "*.[ch]" -exec grep -nH --color=auto $@ {} \;
find . -type d -a -name .svn -prune -o -name "*.[ch]" | xargs grep -nH --color=always "$@"
find . -type d -a -name .svn -prune -o -name "*.[ch]" | xargs grep -nH --color=always "$@"
#find . -name "*.[ch]" -exec grep -nH --color=auto --exclude-dir=.svn $@ {} \;
#try ack
function fbisp () {
find . -type d -name "products" -prune -o -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -name "*.py" -print | xargs /bin/grep -i -n $1 | /bin/grep -iv matches
}
# find base inside products
function fbip () {
find . -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -name "*.py" -print | xargs /bin/grep -i -n $1 | /bin/grep -iv matches
}
# find base source products
function fbsp () {
find . -type d -name "products" -prune -o -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -name "*.py" -print | /bin/grep -i $1 | /bin/grep -iv matches
}
# find base products
function fbp () {
find . -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -name "*.py" -print | /bin/grep -i $1 | /bin/grep -iv matches
}
# find base inside sources C [.c/.h]
function fbisc () {
find . -type d -name "products" -prune -o -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -name "*.[ch]" -print | xargs /bin/grep -i -n $1 | /bin/grep -iv matches
}
# find base inside C
function fbic () {
find . -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -name "*.[ch]" -print | xargs /bin/grep -i -n $1 | /bin/grep -iv matches
}
# find base sources C
function fbsc () {
find . -type d -name "products" -prune -o -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -name "*.[ch]" -print | /bin/grep -i $1 | /bin/grep -iv matches
}
# find base C
function fbc () {
find . -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -name "*.[ch]" -print | /bin/grep -i $1 | /bin/grep -iv matches
}
# find base inside sources
function fbis () {
find . -type d -name "products" -prune -o -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -print | xargs /bin/grep -i -n $1 | /bin/grep -iv matches
}
# find base inside
function fbi () {
find . -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -print | xargs /bin/grep -i -n $1 | /bin/grep -iv matches
}
# find base sources
function fbs () {
find . -type d -name "products" -prune -o -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -print | /bin/grep -i $1 | /bin/grep -iv matches
}
# find base
function fb () {
find . -type d -name "\.svn" -prune -o -name "%*" -prune -o -type f -print | /bin/grep -i $1 | /bin/grep -iv matches
}