Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
script cannot run after psftp from Windows XP

Posted by Kan (Kan), 28 June 2007
Hi,

I've a expect script that used to work fine in the linux box.
I used to ftp back to my windows XP to keep a copy. Also, when I ftp it back to the Linux box, the script can run properly.

Recently, we are only allowed to use secure ftp client, psftp, to copy file into the linux box.  psftp is one of the Putty programs

Found that after using psftp the script from our Windows XP box to the linux box, it will not run in the linux box. Noticed that when I vi the file and try to save it, it shows [DOS] at the status line.

Does anyone know how to solve this problem?

Kan



Posted by admin (Graham Ellis), 28 June 2007
You've probably changed the end of line sequence from \n (linux / unix) to \r\n (Windows) by doing an ASCII mode transfer.   You should use a binary mode FTP transfer to avoid this happening.

Quickest / easiest fix - retransfer in binary mode.   If you don't have he original any more, though, there are utilities to convert for you.

Posted by Kan (Kan), 28 June 2007
Hi Graham,

Thanks for your quick reply.

I still have another working copy in the linux box. However, I need to find a way to transfer script from Windows to Linux.

I've type help in the psftp prompt, there isn't any binary transfer mode.

Do you know of other secure ftp client that support binary transfer? Maybe I can use that instead.

Rgds,
Kan



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho