Good morning Mike.
Each line of text files transferred from windows to
*INX using scp/sftp contains Control-M characters.
It is a pain to run dos2unix utils when there are a
few hundred files.
I can definitely see that.
I did not experience issue when using ftp to transfer
files from windows to *INXs systems
ftp is a different animal.
Is there a switch or ssh_config configuration setting
to suppress the Crontrol-M during transfer ?
Not that I have been able to find (but I'm no sftp/scp guru). If you
were going the other way *NIX to windows then it would be trivial to
write a shell script to do all that for you. For example:
# just put all the files to send into the directory called 'tosend'
# and create another directory called 'sent' and be in in the
# directory right above the 2 tmp directories when you run
# the script
for file in `ls tosend`
do
[command-to-remove-cr-from-file] tosend/$file >$file.tmp
or
[command-to-remove-cr-from-file] tosend/$file -o $file.tmp
scp $file.tmp user@hostname:/path-to-directory/$file
mv tosend/$file sent
rm $file.tmp
done
This is an inelegant script and I'm sure that the 'real' *NIX admins out
there could do a better job (after they stop laughing), but you get the
idea.
So, how does this help you running under windows? Well, there is a UNIX
environment you can install from microsoft but I personally use Cygwin
(cygwin.com). Just install that and you're away to the races.
Hope this helped.
Cheers.
begin:vcard
fn:Frank Bernhardt
n:Bernhardt;Frank
org:b.c.s.i.
adr:;;14 Halton Court;Markham;ON;L3P 6R3;Canada
email;internet:frank@xxxxxxx
title:President
tel;work:905-471-1691
tel;fax:905-471-3016
tel;cell:416-540-7694
version:2.1
end:vcard