Skip to content

Commit 2c8b733

Browse files
IMP: allow use of spaces in terms when the word list is used
1 parent 90cb966 commit 2c8b733

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

find_occurences.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ run_validation_checks(){
4444
}
4545

4646
search_term(){
47-
term=$1
48-
result=$(find $location -type f -print0 | xargs -0 grep -i -l "$term")
47+
term=$@
48+
echo "--- Searching for $term ---"
49+
50+
result=$(find $location -type f -print0 | xargs -0 grep -i -l "\"$term\"")
4951

5052
if [ ! -z "$result" ]
5153
then
@@ -65,7 +67,6 @@ run () {
6567
then
6668
while IFS= read -r search_term
6769
do
68-
echo "--- Searching for $search_term ---"
6970
search_term $search_term
7071
done < "$input_file"
7172
else

0 commit comments

Comments
 (0)