LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Required Script or steps (https://www.linuxquestions.org/questions/programming-9/required-script-or-steps-842066/)

dhirendrs 11-03-2010 02:13 AM

Required Script or steps
 
We are using Centos Linux and Postgresql in our application and i took data dump and found some spical character as below

2157013010798Â
846127017237Â
3607341063397Â
885259255568Â
 884498138212
091202284800Â
 888507485083
8727900746143Â
9.78067E+12
9.78818E+12
8.90404E+12
8.41065E+11
8.88814E+12
8.90172E+12
8.8501E+12
8.85059E+12
9.31016E+12
6.291E+12
9.55506E+12
8.88821E+12
9.30065E+12
8.71044E+12
091202284800
2157013010798
3607341063397
3607341063717
885259255599
885259255575
885259255568
2+21077
\r54534467
\\154534467

i have to take the backup of the file and remove the speical character , i am using below command but still

sed 's/[Â.E+\r\\Ã]//g' test1.txt

character is not removing from it. please guide.
Ã

T0sh1r0 11-03-2010 03:51 AM

I have not used sed for a long time but I would check for the redirections of input and output:
Code:

sed 's/[Â.E+\r\\Ã]//g' <test1.txt >result1.txt

jamesbon 11-03-2010 04:00 AM

Quote:

Originally Posted by dhirendrs (Post 4147715)


i have to take the backup of the file and remove the speical character , i am using below command but still

Which character do you want to remove?
Is that comma , ?

dhirendrs 11-03-2010 04:12 AM

From : dhiren shah
 
Quote:

Originally Posted by jamesbon (Post 4147785)
Which character do you want to remove?
Is that comma , ?

In integration part it is space but in postgresql it is showing like as i mention .


All times are GMT -5. The time now is 06:04 PM.