1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#!/bin/sh
# Free text search
help () {
echo "Free text search in the source code"
echo "Options:"
echo "-p Search only python code."
exit
}
if test "x$1" = "x-p" ; then
if test "x$2" = "x" ; then
help
fi
fi
if test "x$1" = "x-h" ; then
help
fi
if test "x$1" = "x" ; then
help
fi
if test "x$1" = "x-p" ; then
find -name "*.py" | xargs egrep --color=auto -n "$2" Makefile.in
else
find -name "*.py" | xargs egrep --color=auto -n "$1" Makefile.in
egrep "$1" -d recurse --color=auto exercises/standard/lesson-files/*
find -name Makefile | xargs egrep --color=auto -n "$1"
egrep --color=auto -n "$1" *.xml
cd help/C && find | xargs egrep -d recurse --color=auto -n "$1"
fi
|