I want to remove a line from a file which contains a particular character only once, if it is present more than once or is not present then keep the line in file.For example: DTHGTYFGTHDCHYTRHDHTCCYDJUTDYCHere, the character which I want to remove is C so, the command should remove lines FGTHDC and JUTDYC because they have C exactly once.How can I do this using either sed or awk?
How to remove line if it contains a character exactly once
linux;text processing;awk;sed