Running the command:
grep sam someFile.txt
When someFile.txt contains:
someFile.txt
fred 14 m foo sam 68 m bar christina 83 f baz bob 22 m qux Sam 41 m quux
Will produce this output:
sam 68 m bar