I have data such as
ID | Name | Grade
1|Robin Hood so hood | A
2|Gwen Stack DO Rick Stacy |C
3|Bling s/o Peter| A
where so is son of, DO is daughter of, S/O is son of.
I am gazed How I can arrive to
ID | Name | Grade
1|Robin Hood| A
2|Gwen Stack |C
3|Bling| A
As at end I will be mailing these guys there grades where I am not willing to feed full string just Name
I was trying to use while loop, with awk which gives 2nd field into array then for loop to array which was uncessfull
Any SED or AWK method ??
so, DO, s/oyou can dosed -r 's/ (so|DO|s\/o) / /'. If that's not what you want, please clarify your questionso|DO|s\os/o. Do you really just want to have "Bling" there?