Skip to content

Instantly share code, notes, and snippets.

@unok
Last active August 29, 2015 14:07
Show Gist options
  • Save unok/f85b3ecdf498595f36f9 to your computer and use it in GitHub Desktop.
Save unok/f85b3ecdf498595f36f9 to your computer and use it in GitHub Desktop.
fulltext search :)
#!/bin/sh
if [ "$1" == "" ]; then
echo "USAGE: $0 search_arg [search_arg]..."
exit 1
fi
CMD="grep -R -l \"$1\" *"
shift
while [ "$1" != "" ]
do
CMD="$CMD | xargs grep -l \"$1\""
shift
done
eval $CMD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment