I have a task that I need to find in the contents of a file the lines containing first and last name that both start with the same letter. Everything I have tried only searches for the first letter in the first name or just doesn't output anything. Can I get some guidance on where to go on this?
Data that needed to be parsed:
Frank Smith
Jim Jones
William Tuft
Jill Johnston
Fred White
Sue Cream
Barbara Bennett
Jeff Gordo
I figured it out using this egrep command:
egrep '(J[a-z]+ J)' addresses.txt
*for privacy reasons, I removed the addresses