RE: [PHP-DB] I have a CR-LF problem when pulling stuff out of my DB
| From: | Russell Johnson | Date: | Thu, 19 Aug 2004 12:50:24 +0000 |
| Subject: | RE: [PHP-DB] I have a CR-LF problem when pulling stuff out of my DB | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-35802@lists.php.net to get a copy of this message | ||
Actually, an easier tool to use is dos2unix, which is available on most Linux boxes. Just type
dos2unix [filename], and you should be all set.
- Russ Johnson
Sabadell Spain
-----Mensaje original-----
De: Michael Cortes [mailto:cortesm@fortleboeuf.net]
Enviado el: Thursday, August 19, 2004 1:36 PM
Para: php-db@lists.php.net
Asunto: [PHP-DB] I have a CR-LF problem when pulling stuff out of my DB
This may not be exaxtly PHP-DB related but it is a result of screwing
something up <grin>.
I pulled a bunch of data from a DOS formatted tab seperated file and now I am
dumping back out into a text file (on linux).
So, as you can imagine, I ended up with a bunch of ^M throughout the file. I
plan on fixing this. The solution is easy enough. I just need to remember
to open the text files in vim and save as unix files.
However, I now have an immediate need. I want to open these five files in vim
and find and replace the ^M in every instance. I know how to find and
replace (:g/find//s/replace/g). But I cannot get the ^M in the string. If I
actually hit <ctrl-m> it reads as a return; if I type ^M using the shift-6
then it looks for the actual characters.
Can anyone help?
--
Michael Cortes
Fort LeBoeuf School District
34 East Ninth Street
PO Box 810
Waterford PA 16441-0810
814.796.4795
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php