RE: Tru64 ftp ksh script problem
Posted in 2005
Xuanhai Carmichael wrote I would say unix-tru64-managers was a more appropriate group, but ... > Hi everyone, > I have the two scriptx below. It ran without error; however > the files were not transferred. Please let me know what I'm > doing wrong. Any help is very appreciated. > Xuanhai > > > #!/bin/ksh > #script1 > ftp <<EOF > open myservername #W2K server > myusername #myusername on W2k server > mypassword #mypassword on W2K server > put enpull.csv #transfer this file from tru64 to W2K > server > put glpull.csv > EOF > What happens if you type in - ftp myservername Does it give you a login prompt. This will confirm the W2K server is running an FTP server. > > #!/bin/ksh > #script2 I found this script on UNIX script website > userstr = "myusername" > pwstr = "mypassword" > file1 = "enpull.csv" > file2 = "glpull.csv" > ftp -in W2Kservername <<-END_FTP #connect to W2K > server > user $userstr $pwstr #myusername and mypassword on W2k server > put ${file1} #transfer this file from tru64 to W2K > server > put ${file2} > END_FTP > In an FTP script, I would always put binary/ascii command to ensure the correct transer mode is used. FTP scripts do not like the '#' comment symbol. Take all comments out. By default the transerred file will be put in the users home directory, is that where you are looking ? Otherwise you want a cd command to change to where you want it put. Are the data files to be transferred in the current directory, else you need an lcd command. Colin Bull _______________________________________________________________________ This email has been scanned for all known viruses by the MessageLabs Email Security System. _______________________________________________________________________ sending to informix-list