...first name using grip command? I am assuming you mean 'grep' command, since that is what you started working with below. (Grip is a CD ripper or something like that.)
grep -owi '[a-z]*[veron][a-z]*' dictionary.txt
The -o lets you return only the match, not the whole line
The -w helps you only find matches for a word, this makes it easier to write the regex
The -i lets you ignore case
You can put them together -owi
Then, instead of searching for '.*' which searches for any character at all (remember, this includes ALL characters, like new-line (which is a single Ascii character) and spaces and numbers. I assume you only want words...made of alphabetical letters...and so start and end with [a-z]*
For your name, you want to look for any of the characters, if they occur at least once, and so you can just put [theCharactersOfYourName] in brackets. It doesn't matter if there are more, they will be picked up by the 'any number of characters' before and after.
Edit - my name is vernon, which is why I searched with 'veron', not needing both the n letters.
|