You need to be more specific about what you are trying to accomplish.
Do not assume that we have the same thought.
Now say you have a directory with various files that are text based, and you need to search in all those specific files for a certain pattern, quickly.
for i in `ls -1 /dir/*.txt`;do cat $i | grep "pattern";done
The above command looks in the dir directory for all files ending with .txt extension, places them in a list in memory, then for each file found, it runs the cat command on it.
The output of the cat command is then piped ( | ) to grep, which searches for pattern specified.
Alternatively, if it is a long output list being generated you could send all of that information to a separate file to be later parsed like so:
for i in `ls -1 /dir/*.txt`;do cat $i | grep "pattern" >> resultfile.txt;done
Are we speaking the same language?