I often run find in my code projects when I make a change somewhere and I have to find where it impacts other pieces of code, so I thought about writing a very small script to make this easier, call it blah.sh:#!/bin/bash -euif [ $# -ne 3 ]; then    echo Three inputs requiredelse    find $1 -name $2 -exec grep -iHn $3 {} \;fiThe problem is, I get an error when the third argument (the text I'm looking for) contains a space. For example, blah . '*.php' 'foo bar' returns grep: bar: No such file or directory for each file grep tried to explore. I'm sure it's a silly mistake, I'm not really hands on with bash..
Problem with small bash script
find;grep;bash script
have you tried like this:find $1 -name $2 -exec grep -iHne $3 {} +Without the quotes, bash performs word splitting and filename generation on the variables, so they wind up getting passed as multiple arguments.