Saturday, August 7, 2010

How to remove Single Quote

I'd like to achieve the following :

Input Text :

'AAAAA','BBBBB','123456'
'CCCCCCCC','OKOKOKOKOK','2234222'
'FFF','ASDFASDF','123'


Expected output :

Remove single quotes.

AAAAA,BBBBB,123456
CCCCCCCC,OKOKOKOKOK,2234222
FFF,ASDFASDF,123



Here is the answer :


sed "s/'//g" input.txt >output.txt


Or if you have GNU sed

sed -i "s/'//g" input.txt

Cheers.

No comments:

Post a Comment