I'm trying to remove only the email addresses from the 7th field. I've attempted to do this via sed but i'm unable to pick/choose the col that i want to remove. I wanted to remove all the email addresses present in the 7th field.
Input file:
980||||||development@gmail.com||77880|GB||0CA005D||
7980||||||development@gmail.com||5656|PO||69B88008BE||
100||||||apple@appl.com||31000|USA||0C5D||
101||||||||3100df0|CAN||0C5D||
570||||||user@live.com||5521123|RSA||B70F2||
080570||||||test@yahoo.com||AV6777|OI||A005D||
1870||||||USA||5521123|RSA||B70F2||
70||||||RABBIT||AV6777|OI||A005D||
Output:
980||||||||77880|GB||0CA005D||
7980||||||||5656|PO||69B88008BE||
100||||||||31000|USA||0C5D||
101||||||||3100df0|CAN||0C5D||
570||||||||5521123|RSA||B70F2||
080570||||||||AV6777|OI||A005D||
1870||||||USA||5521123|RSA||B70F2||
70||||||RABBIT||AV6777|OI||A005D||
this is what i tried to get to the result but i'm not able to get there.
sed 's/,[a-z][0-9]\@[a-z][0-9]\.[a-z]//' file
awk 'BEGIN{FS=OFS="|"} { $7=""}1 file'
– Valentin Bajrami Sep 20 '19 at 09:30