Using grep as a Filter
The grep utility could be used with other utilities as an information filter.
# ls | grep samples
The output of the ls command is straightly provided to the grep command as input. The pattern "samples" is finding in the list of filenames, along with the grep command.
Note: One must be careful although using the character #,*,[,^,?,(,), and \ in the pattern_list since they are also meaningful to the shell. That is safe to enclose the entire pattern_list in single quote'...'.