#!/bin/bash # # Helper script to quickly find strings in the source show="-l" if [ "show" = "$1" ] ; then show="" shift fi dir='' if [ -d "$1" ] ; then dir="$1" shift fi if [ -z "$dir" ] ; then echo "find bin -exec grep $show \"$1\" {} \; 2> /dev/null | grep -v __pycache__" find bin -exec grep $show "$1" {} \; 2> /dev/null | grep -v __pycache__ find lib -exec grep $show "$1" {} \; 2> /dev/null | grep -v __pycache__ else echo "find $dir -exec grep $show \"$1\" {} \; 2> /dev/null| grep -v __pycache__" find $dir -exec grep $show "$1" {} \; 2> /dev/null| grep -v __pycache__ fi