FTP command issue in shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting FTP command issue in shell script
# 1  
Old 03-12-2013
Blade 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.

Code:
 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
 bye

From one of my server, this code is not correctly. I am able to ftp files, But receiver is getting only a part of it. My actual file size is 1 mb and recevier is getting only 40 Kb.

Intersting thing is that the same code is working from another server. Both of my machine is having HP Unix insatalled in it. The recever is Maniframe system.

I am new to Unix and finding it hard locate the issue. Any help regarding this issue is greatly appriciated.



Thanks in advance
Renjith

Last edited by Corona688; 03-12-2013 at 06:28 PM..
# 2  
Old 03-12-2013
This could be a networking problem rather than an FTP problem, perhaps your MTU is set too large for the recipient to handle.
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 03-12-2013
Thank for the quick replay.

I am able to send files from a different machine to same server with out any issue. So can you please help me to where to check the difference between them?
# 4  
Old 03-13-2013
There is certainly no related bug in your script - nothing for this forum.
"HP-UX" or "IP Networking" are certainly better.
For a start, try the following HP-UX commands for comparing and debugging:
Code:
swlist
netstat -i
ifconfig lan0
traceroute ...

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cut command issue with shell script

I am writing a shell script to skip couple of feilds in a flat file and as a part of this I have written the below piece of code in it. cut -d '|' -f 1-17,19-31 $1 > filename To add pipe at end of the line I used below command, but it adds even to header and footer as well which i... (11 Replies)
Discussion started by: Aditya_001
11 Replies

2. 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

3. UNIX for Dummies Questions & Answers

FTP that works correctly in command prompt and shows issue in UNIX server

Hi All, FTP ports opens with the given user name and password and allows to download file through COMMAND PROMPT. Code as below: H:\>ftp ftpxxxxx Connected to entvc2ft07-pub.xxxxx.com. 220 Microsoft FTP Service User (entvc2ft07-pub.xxxxx.com:(none)): userxxxxx 331 User name okay, need... (1 Reply)
Discussion started by: vijayalakshmi.r
1 Replies

4. Shell Programming and Scripting

shell script for ftp files passed in command line argument

i want to write a shell script function that will ftp the files passed in the command line . i have written a shell script for ftp but how will it do for all files passed in command line argument , i am passing 4 files as argument ./ftp.sh file1 file2 file3 file4 code written by me... (5 Replies)
Discussion started by: rateeshkumar
5 Replies

5. Shell Programming and Scripting

problem in exit status of the command in a shell script-FTP

Hi All, I have developed below script for FTP a file from unix machine to another machine. ftpToABC () { USER='xyz' PASSWD='abc' echo "open xx.yy.zbx.aaa user $USER $PASSWD binary echo "put $1 abc.txt" >> /home/tmp/ftp.$$ echo "quit" >> /home/tmp/ftp.$$ ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies

6. 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

7. 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

8. Shell Programming and Scripting

Use ftp command in shell script

How can i use FTP Command in a shell script ? user='user1' password='password1' IP='***.***.***.***' ftp -n $IP 22 <<END_SCRIPT user $user $password exit END_SCRIPT (3 Replies)
Discussion started by: infyanurag
3 Replies

9. Shell Programming and Scripting

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... `ftp -vin <<- FTP >> log.txt 2>&1 user ibm\user password FTP` my log says.. user ibmuser not found... please help..... (4 Replies)
Discussion started by: mgirinath
4 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