I'm working in a small bash script. I need to remove an entire line that match an exact word in only the first word of the line.
That's how the text file looks:
John is a dumb
Maria is awesome
Toni and Maria are funny
I want to remove the just the second line.
Right now, I can match the exact word "maria" but it removes the third line too:
sed -i "/\b\(maria\)\b/d" file.txt
How to specify just the first word?
Thanks!