Daniel,

What about just running your import file through dos2unix before piping
it to mysql?

That way, it would leave \n alone (since that is unix format) and
replace any occurrances of 
\r\n with plan old \n.

--
George
 

> -----Original Message-----
> From: Daniel Kasak [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 20, 2006 11:21 PM
> To: mysql@lists.mysql.com
> Subject: mysqlimport, \r\n and \n
> 
> I've got some import scripts that are giving me trouble.
> 
> Some MOFOs keep changing the format of the data they give us, 
> and sometimes I loose half the records. When this happens, I 
> change the line terminator from \r\n to \n  ...  or from \n to \r\n.
> 
> It's starting to get to me. Is there any way to ease my pain 
> here, short of importing with one format, counting the number 
> of records, truncating the table, importing wit the other 
> format, counting the number of records, and then selecting 
> the format with the most number of records?
> 
> --
> Daniel Kasak
> IT Developer
> NUS Consulting Group
> Level 5, 77 Pacific Highway
> North Sydney, NSW, Australia 2060
> T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
> email: [EMAIL PROTECTED]
> website: http://www.nusconsulting.com.au
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to