Is there a way to find a specific record among the whole line?
This is my file:
one two three four two three four five three four five six four five six seven five six seven eight
How do I search for all lines which include two?
Hmm apparently you can also use word-boundary tags (which looks slightly more elegant but isn't as portable):
Not sure what your specific use-case is (I assume it's not numbers), you might be just as well off with
For this simple task you can also use grep:
To get the "two" if it is not at the beginning of a line:
or with meta-characters to get it only at the beginning of a line: