I'm looking some text in files , but three are a lot of files and searched text appears several times in one file, how can I receive a list of files that contains searched text with every file listed only once?
grep -l LIST PATTERN is the way to go. Alternatively one could use
xargs to do the same thing:
xargs grep "My Search Pattern" < input.txt
xargs is particularly useful when you would want to use
grep on several filenames passed from a pipe, for instance:
find ~/Documents ~/bin -print0 | xargs -0 grep 'Search Term'