dibaliklayar

Thursday, April 13, 2006

Strange things happened using SSH Secure Shell

I am using SSH client called SSH Secure Shell from www.ssh.com.

Server - linux
client - windows

When I upload file particularly file with '.txt' extension, SSH doing parsing and convert the new line character of windows ('\r\n') to new line character of Linux ('\n'). So when you upload txt file in this environment you will lost a few bites.
\r character is gone........ eaten by SSH Secure Client.

Maybe this is because I never see the manual or I am using a freeware....

I don't know whether to call this feature or what. but this makes me waste 3 hours of my time.... so hungry now :(((

This only happened with txt file. Since I do this on regular basis to upload comma seperated file into mysql database.

so when you do 'load data infile' command make sure try LINES TERMINATED BY '\r\n' and LINES TERMINATED BY '\n' in mysql.
if you have binary file viewer then you know what I mean.

in hex

\r\n = 0D0A

interesting.......:)

1 Comments:

At 8:03 PM, Blogger Webincome said...

I liked your posting about mysql

I hope you have backed up your database, don't let it crash and disapear like I did, read about how I lost my database, and how I now have a great new tool to backup my database automatically http://www.databasebackup.co.uk

 

Post a Comment

<< Home