please help ftp script issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting please help ftp script issue
# 1  
Old 04-27-2006
please help ftp script issue

hi,

I have ftp script where the user name has "\" in it and my script unable to detect it....here is what I am doing...

Code:
`ftp -vin <<- FTP >> log.txt 2>&1
      user ibm\user password
      FTP`

my log says..
user ibmuser not found...

please help.....
# 2  
Old 04-27-2006
Try escaping the \

Code:
`ftp -vin <<- FTP >> log.txt 2>&1
      user ibm\\user password
      FTP`

# 3  
Old 04-27-2006
Tried it...did not work...gives me same result any more ideas please....
# 4  
Old 04-28-2006
Ignoring the awful practice of having punctuation characters other than underscores and hyphens in a username, I was able to get this to work by using a .netrc file

machine localhost login ibm\\user password password

Then using the command line:

Code:
ftp -vi localhost 1>>log.txt 2>&1 <<- FTP
ls
FTP

# 5  
Old 04-28-2006
Here is how I do mine with the slash in the username, the quotes around the variable seem to take care of the issue.


HOST='ipaddress'
USER='domain\username'
PASSWD='password'
ftp -v -n $HOST >> ftp.log <<END_SCRIPT
quote USER "$USER"
quote PASS $PASSWD
cd My/Path/To/Files
prompt
bin
mput *
quit
END_SCRIPT
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ftp issue

In the automated process. due to space in between banking and critical, the below command is not working in the automated process. Can anyone help it out. If I am putting cd banking critical-Bas" and file get ftp'ed. but not through the below line ftp -m "ftp.com" -d "banking critical-Bas" (4 Replies)
Discussion started by: ramkumar15
4 Replies

2. IP Networking

Issue with FTP?

HI Guys, Issue:: While doing bye command on ftp, it just hings as below untill you try Ctrl+C 891 bytes received in 0.0017 seconds (526.16 Kbytes/s) ftp> bye 221-You have transferred 0 bytes in 0 files. I too have tried with other commands like, close, disconnect etc but no luck. ... (1 Reply)
Discussion started by: Atp3530
1 Replies

3. Shell Programming and Scripting

FTP command issue in shell script

Hi All I am using following code in my shell script to send the file to a mainframe server. ftp -in $FTP_IP_SEND <<END_OF_FTP >$LOG_DIR/ProviderExportFTP.log quote user $FTP_USER_SEND quote pass $FTP_PASS_SEND ascii send ./ProviderExport.txt 'PROJ.PDRCACTS.FD87050.EXPORT' (REPLACE... (3 Replies)
Discussion started by: Renjith180282
3 Replies

4. Red Hat

FTP issue

Hi everybody, I would like to findout a directory or a file which is located at ftp server by connecting with ftp <ip> by using any other linux utility. I tried with find and locate commands in this manner but didnt work. Please help me. Regards, Mastan (1 Reply)
Discussion started by: mastansaheb
1 Replies

5. Red Hat

FTP issue

Hi, I have installed RHEL 5 on Vmware. I have configured a simple FTP. I am able to transfer and receive files from the vmware-RHEL to my desktop on which vmware is installed and vice-versa. But when i try from other machine in the network it fails. (2 Replies)
Discussion started by: chetansingh23
2 Replies

6. Shell Programming and Scripting

FTP script variable issue

Hi , I have a following code ,I need to send two files on FTP server using single code UDL_FTIHOST_1=podftiapp02.com UDL_FTIUSER_1=dbsunny UDL_FTIPWD_1=sunny@11 UDL_FTIHOST_2=podftiapp01.com UDL_FTIUSER_2=dbamy UDL_FTIPWD_2=amy@12 count=2 i=1 while do FTIHOST=$(echo... (3 Replies)
Discussion started by: sonu_pal
3 Replies

7. UNIX for Advanced & Expert Users

FTP-Shell Script-Performance issue

Hello All, Request any one of Unix/Linux masters to clarify on the below. How far it is feasible to open a new ftp connection for transferring each file when there are multiple files to be sent. I have developed shell script to send all files at single stretch but some how it doesnt suit to... (3 Replies)
Discussion started by: RSC1985
3 Replies

8. Shell Programming and Scripting

Performance issue with ftp script.

Hi All, I have written a script to FTP files from local server to remote server. When i try it for few number of files the scripts runs successfully. But the same script when i run for 200-300 files it gives me performanace issue by aborting the connection. Please help me out to improve the... (7 Replies)
Discussion started by: Shiv@jad
7 Replies

9. Shell Programming and Scripting

FTP Issue-Help

Hi all, I am trying to transfer files from one server to another. Following is script i wrote for this purpose. It downloads the file to the server which the script is residing and uploads it to the remote server. Main Script #!/bin/bash -x ... (2 Replies)
Discussion started by: Tuxidow
2 Replies

10. UNIX for Advanced & Expert Users

Unix Shell script FTP Issue

Hi All We have a number of FTP Shell scripts running every day on a scheduled basis. The issue we have is if the host connection is not available after a little while ftp times out and the script hangs as the shell returns to the ftp> prompt waiting for input from a user. Any ideas how... (2 Replies)
Discussion started by: mlucas
2 Replies
Login or Register to Ask a Question