So I have a file
list with list of the people in a company. Each line contains Position(a short string), years, name(first and last), salary and nationality(three capital letters). They are divided with commas.
I want to find two things using grep and regex:
- All people whose last name starts with C.
- All people who have 3 names
For the first I have tried:
grep -E 'C\>' list, but it gives back only one name(strange).
For the second:
grep "[[:alpha:]]\b[ ]\?[[:alpha:]]\b\?[[:alpha:]]" list, but it also fails.