LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-03-2010, 02:13 AM   #1
dhirendrs
Member
 
Registered: Nov 2009
Posts: 32

Rep: Reputation: 15
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.
 
Old 11-03-2010, 03:51 AM   #2
T0sh1r0
Member
 
Registered: Oct 2010
Location: Lige, Belgium
Distribution: Debian / Slackware
Posts: 47
Blog Entries: 1

Rep: Reputation: 7
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
 
Old 11-03-2010, 04:00 AM   #3
jamesbon
Member
 
Registered: Jun 2010
Posts: 130

Rep: Reputation: 9
Quote:
Originally Posted by dhirendrs View Post


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 , ?
 
Old 11-03-2010, 04:12 AM   #4
dhirendrs
Member
 
Registered: Nov 2009
Posts: 32

Original Poster
Rep: Reputation: 15
From : dhiren shah

Quote:
Originally Posted by jamesbon View Post
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 .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] First steps script JoelSmit Linux - Newbie 5 07-17-2010 03:17 AM
The steps likely required for upgrading Slackware to Slackware64. Shingoshi Slackware 49 08-29-2009 07:28 AM
All the steps required for building a functional Gentoo stage4 from scratch. Shingoshi Linux - Distributions 8 05-10-2008 11:22 AM
A script that renames a folder to an integer after some other steps... Cyberman Programming 5 09-11-2007 07:32 AM


All times are GMT -5. The time now is 12:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration