Reputation: 75
I have one csv file including name information with suffix.
LNAME,Date
MURRY-IV,1990
SMITH,1998
DEL-IVY,2000
EDWARD-IV,1990
I want to remove all those suffix parts. My expected output should be
LNAME,Date
MURRY,1990
SMITH,1998
DEL-IVY,2000
EDWARD,1990
To do that, I used sed 's/-IV//g' filename
. But the output became
LNAME,Date
MURRY,1990
SMITH,1998
DELY,2000
EDWARD,1990
So the name DEL-IVY was revised as well. How shall I get around this issue?
Upvotes: 0
Views: 167