Replacing Control-M Character
Posted in 2005
Topics: General Discussion
Hi, I have some control characters in the fields of the database and I want to replace them with space. I tried with replace command but could not succed. Any idea how to do it. Bye.
Try using a ctrl-v then ctrl-m for the search criteria - in vi it would look something like this... :%s/^V^m/ /g Let me know if this helps -----Original Message----- From: PARAMESHWAR.... [SMTP:pcdudyala@yahoo.com] Sent: Wednesday, February 02, 2005 9:37 PM To: ids@iiug.org Subject: Replacing Control-M Character [4145] Hi, I have some control characters in the fields of the database and I want to replace them with space. I tried with replace command but could not succed. Any idea how to do it. Bye.
Complementing this idea it would be: Unload your data to a flat file, do what Dusty says in vi with the flta file you downloaded and reload the data again. It should work. J. -----Original Message----- From: "Dusty Haas" <dhaas70@qwest.net> To: ids@iiug.org Date: Thu, 3 Feb 2005 01:49:23 -0500 (EST) Subject: RE: Replacing Control-M Character [4146] Try using a ctrl-v then ctrl-m for the search criteria - in vi it would look something like this... :%s/^V^m/ /g Let me know if this helps -----Original Message----- From: PARAMESHWAR.... [SMTP:pcdudyala@yahoo.com] Sent: Wednesday, February 02, 2005 9:37 PM To: ids@iiug.org Subject: Replacing Control-M Character [4145] Hi, I have some control characters in the fields of the database and I want to replace them with space. I tried with replace command but could not succed. Any idea how to do it. Bye. Jean Sagi jeansagi@myrealbox.com jeansagi@yahoo.com
man dos2unix to figure out where it lives on your system dos2unix file_with ctl_chars new_file Personally, I use the vi Esc:%s/<ctl-v><enter>//g But to each their own, and dos2unix is quite spiffy :) sam -----Original Message----- From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org] On Behalf Of Dusty Haas Sent: Thursday, February 03, 2005 1:49 AM To: ids@iiug.org Subject: RE: Replacing Control-M Character [4146] Try using a ctrl-v then ctrl-m for the search criteria - in vi it would look something like this... :%s/^V^m/ /g Let me know if this helps -----Original Message----- From: PARAMESHWAR.... [SMTP:pcdudyala@yahoo.com] Sent: Wednesday, February 02, 2005 9:37 PM To: ids@iiug.org Subject: Replacing Control-M Character [4145] Hi, I have some control characters in the fields of the database and I want to replace them with space. I tried with replace command but could not succed. Any idea how to do it. Bye.
On HP the command is "dos2ux". There's also a "ux2dos" to set Unix test up for Windows. Darrell Murphy Burton Snowboards -----Original Message----- From: Gentsch, Sam [mailto:sgentsch@intercall.com] Sent: Thursday, February 03, 2005 3:35 PM To: ids@iiug.org Subject: RE: Replacing Control-M Character [4163] man dos2unix to figure out where it lives on your system dos2unix file_with ctl_chars new_file Personally, I use the vi Esc:%s/<ctl-v><enter>//g But to each their own, and dos2unix is quite spiffy :) sam -----Original Message----- From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org] On Behalf Of Dusty Haas Sent: Thursday, February 03, 2005 1:49 AM To: ids@iiug.org Subject: RE: Replacing Control-M Character [4146] Try using a ctrl-v then ctrl-m for the search criteria - in vi it would look something like this... :%s/^V^m/ /g Let me know if this helps -----Original Message----- From: PARAMESHWAR.... [SMTP:pcdudyala@yahoo.com] Sent: Wednesday, February 02, 2005 9:37 PM To: ids@iiug.org Subject: Replacing Control-M Character [4145] Hi, I have some control characters in the fields of the database and I want to replace them with space. I tried with replace command but could not succed. Any idea how to do it. Bye.