i have a text file that contains something like this.
1 AC AT RR cOO
2 EE cFF HGB cEVY
3 WDU RWS cTY NBE
but it contains a lot of rows and that's an example of the data
what i want to do is to to create another text file using a shell script from this text file with these modifications:
1-let the same ordering of the same file
2-change each value that contains c to without c
3-add c to each value that does not contain c
sed can do it. The trick is to deal with the 'c' so that sed doesn't remove it entirely until the new 'c' are added in. That's the point of the '%' in the first and last clauses of the script. I'm assuming that the leading digits in your example are line numbers and should never be changed. That allowed me to pay attention to leading white space in each token.