[B955991_ABBVIE_HCV_DEV@cdtsorl239p B955991_ABBVIEHPC_DAS_DEV]$ head CHGSUM.CSV | sed 's/^~*//; s/~*$//'
~~~ COUNT ~PERCENT~~~~~~~~~~~~~~~~~~~~~~~~
OLD PRODUCT RECORD COUNT ~ 15476~100.00%~~~~~~~~~~~~~~~~~~~~~~~~
NEW PRODUCT RECORD COUNT ~ 15609~ 0.85%~~~~~~~~~~~~~~~~~~~~~~~~
NEW PRODUCT RECORDS INSERTED ~ 133~ 0.85%~~~~~~~~~~~~~~~~~~~~~~~~
OLD PRODUCT RECORDS DELETED ~ 0~ 0.00%~~~~~~~~~~~~~~~~~~~~~~~~
OLD PRODUCT RECORDS UNCHANGED ~ 15249~ 98.53%~~~~~~~~~~~~~~~~~~~~~~~~
OLD PRODUCT RECORDS UPDATED ~ 227~ 1.46%~~~~~~~~~~~~~~~~~~~~~~~~
CHANGES TO PRODUCT NAME ~ 0~ 0.00%~~~~~~~~~~~~~~~~~~~~~~~~
CHANGES TO PRODUCT TYPE ~ 0~ 0.00%~~~~~~~~~~~~~~~~~~~~~~~~
CHANGES TO PRODUCT LEVEL ~ 0~ 0.00%~~~~~~~~~~~~~~~~~~~~~~~~
>sed 's/~//g' GPS_input.txt
COUNT PERCENT
OLD PRODUCT RECORD COUNT 15476100.00%
NEW PRODUCT RECORD COUNT 15609 0.85%
NEW PRODUCT RECORDS INSERTED 133 0.85%
OLD PRODUCT RECORDS DELETED 0 0.00%
OLD PRODUCT RECORDS UNCHANGED 15249 98.53%
OLD PRODUCT RECORDS UPDATED 227 1.46%
CHANGES TO PRODUCT NAME 0 0.00%
CHANGES TO PRODUCT TYPE 0 0.00%
CHANGES TO PRODUCT LEVEL 0 0.00%
Except, of course, that that removes all tildes instead of only those at the start of a line and those at the end of a line. The OP did not want to remove the tildes before and after the COUNT field.
you have dropped all the tilde characters including those mid-line, which is not what was requested. Scrutinizer and Akshay Hegde have the best answers.