I have a text file with delimiter "|" and sometimes the zipcode is in "5th" column or "6th" column. I want to scan the file and remove the "-2323" from the zipcode which has zip+4 digits
The "sed 's/-.*|/|/' file" works for me however how can I specify to remove the "-" on a particular column so that it doesnt touch ant other fields with "-" ? I n this case I only want to touch the field 12