Q: How to do any number of files in grep? I want to make script which will look for phrase in files. I would like to not specify number of files, where this script will look. 

A: If your script will be called like ./script phrase ./file1 ./file2 ..., then you can use grep within the script like this:
grep "$@"

This is probably what you want.

If your script has options, like ./script option1 phrase option2 ./file1 ..., then you can use grep within the script like this:
grep "$2" "${@:4}"

This case uses 2 because phrase is argument 2, and uses 4 because the first file is argument 4.

A: You could put all files that needed to be searched on a directory (ex.: /folder/search/) and then run the following:
grep -ri "Phrase to be searched here" /folder/search/

That code would look for the phrase to be searched and match the phrase in a case insensitive way (ex.: it would match "Phrase" but and also "phrAse").
