Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: get rid of carriage return in vi
I will give you one more simple one. There is a command called dos2unix. It takes 2 parameters; a starting file and an ending file. And the file names can be the same. So, if you have a single file called "Transfered.dat" which has the ^M characters in it run
dos2unix Transfered.dat Transfered.dat
If you have multiple files you can always use the find command to run it on each of them. Lets say you have transfered 1000 .dat files over and you need to clean them all up:
find . -name "*.dat" -exec dos2unix {} {} ;\
This will find all the *.dat files in the current directory then run the dos2unix command on each.
-----Original Message-----
Sent: Thursday, July 12, 2001 9:26 AM
To: Multiple recipients of list ORACLE-L
Sorry if I'm taking this too far, but I sometimes get those ^M characters in files when I FTP in the wrong mode (ascii vs. binary). If this file has been recently transferred to your Unix box, try re-FTPing it in a different mode and those ^M characters may go away.
If this doesn't apply to you, just ignore my ramblings and use one of the many good solutions provided to remove the offending character.
HTH, John D.
"Sairlao, Chark" <SairlaoC_at_transfie To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> ld.com.au> cc: Sent by: Subject: get rid of carriage return in vi root_at_fatcity.com 07/12/2001 03:35 AM Please respond to ORACLE-L
all,
I got this file which conntans ^M in the middle of the line, how do I get rid of it in vi
thanks
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Sairlao, Chark
INET: SairlaoC_at_transfield.com.au
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: John.Dailey_at_ing-fsi-na.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jul 12 2001 - 09:34:39 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |