Sponsored Content
Full Discussion: ftp exit status.
Top Forums UNIX for Advanced & Expert Users ftp exit status. Post 9029 by kong on Sunday 21st of October 2001 11:34:41 PM
Old 10-22-2001
Hi Oracle8,

Yep, try doing this:
Code:
if ftp -n -v IP.ADDRESS << END > ftplogfile.log
   user USERNAME "PASSWORD"
   cd location_of_file
   bin # if binary file
   get file
   bye
END
then
   echo "Ftp completed successfully."
else
   echo "Ftp failed. Examine log below."
   cat ftplogfile.log
fi

added code tags for readability --oombera

Last edited by oombera; 02-20-2004 at 11:48 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Incorrect Exit Status Returned from FTP command - Help??

I am trying to perform some error handing within a Korn sheel script whilst FTPing a file from one server to another.. The exit status is correctly set to zero, if my script connects to the other server and sends the file.. However, if for whatever reason other than a timeout the script... (3 Replies)
Discussion started by: frustrated1
3 Replies

2. Shell Programming and Scripting

exit status

i downloaded a text file from metalab.unc.edu called sh.txt and in this reference manual it refers to shell scripting exit status .. at the end of one of the examples that author gave an exit status of 127.. to what does a 127 exit status refer too and what is its purpose in the code. moxxx68 (1 Reply)
Discussion started by: moxxx68
1 Replies

3. Shell Programming and Scripting

How to get the exit status

Hi all, I'm running a program which return 1 upon success. But when encounters problem shell return 's '1' . How to differentiate between them the shell return value and script return value. Ex. function fn return '1' if executed successfully and '0' if failed. But when if shell encounters... (1 Reply)
Discussion started by: yhacks
1 Replies

4. Shell Programming and Scripting

Exit status

I'm preparing for exam and one of exams is to write own test command... I wonder if in unix is a command which just returns exit code you specify.. I know I can easily write a function like this: exStatus() { return $1 } -> my question is rather theoretical thank you! (9 Replies)
Discussion started by: MartyIX
9 Replies

5. Shell Programming and Scripting

How to track exit status of ftp automation

ftp automation code is ftp -v -n -i $host_name << EOF user $u_name $u_pass bi mput $tar_file bye EOF How to check whether the file is successfully transfered or not. Suppose the user name or password is provided wrongly then the code should track the error and ask the end user to enter... (2 Replies)
Discussion started by: Dip
2 Replies

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

7. Shell Programming and Scripting

Exit status for ftp in CShell

Is there a way in the following CShell code to have ftp give an exit status that can be retrieved to determine if it succeeded or failed? ftp -n logxx.xxxx.xxx.xxx.com <<DO_FTP1 quote user $user_name quote pass $password ascii put $js_file_name bin put $FinalZipFile quit DO_FTP1 ... (1 Reply)
Discussion started by: phudgens
1 Replies

8. Shell Programming and Scripting

Exit Status

I have a shell script (#!/bin/sh) that interacts with Appworx and Banner Admin. In my script I want to check the exit status of awrun before continuing. awrun can run for 10 seconds or it can run for over a minute. So my question is, will it go through my if statement before awrun may even be... (2 Replies)
Discussion started by: smkremer
2 Replies

9. Shell Programming and Scripting

Want to get the exit status

Hi All, I am trying to create a zip file with all the txt files(these are in large number) in the current directory. I am able to do this operation sucessfully. After this i want to get the status of the tar command executed and do accordingly. When i am trying with the below code, the status... (3 Replies)
Discussion started by: paddu
3 Replies

10. UNIX for Beginners Questions & Answers

How to see the status of all the ftp put & get files logs and curent ftp transfer status ?

How to see the status of all the ftp put & get files logs and curent ftp transfer status if any active ftp running in the background ? (2 Replies)
Discussion started by: i4ismail
2 Replies
globus_i_gass_copy_state_target_s(3)				 globus gass copy			      globus_i_gass_copy_state_target_s(3)

NAME
globus_i_gass_copy_state_target_s - SYNOPSIS
Data Fields char * url globus_gass_copy_attr_t * attr globus_mutex_t mutex globus_fifo_t queue int n_pending int n_simultaneous int n_complete globus_i_gass_copy_target_status_t status globus_gass_copy_url_mode_t mode union { struct { } ftp struct { globus_gass_transfer_request_t request } gass struct { globus_bool_t free_handle globus_bool_t seekable } io } data Detailed Description GASS copy target (e.g. source, destination) transfer information. Field Documentation char* globus_i_gass_copy_state_target_s::url url for file transfer globus_gass_copy_attr_t* globus_i_gass_copy_state_target_s::attr attributes to control file transfer globus_mutex_t globus_i_gass_copy_state_target_s::mutex coordinates the modifying of the target structure globus_fifo_t globus_i_gass_copy_state_target_s::queue a queue to manage the reading/writing of data buffers int globus_i_gass_copy_state_target_s::n_pending Used for keeping track of reads/writes in the read/write queue. int globus_i_gass_copy_state_target_s::n_simultaneous Used to limit the number of n_pending. int globus_i_gass_copy_state_target_s::n_complete Used to compute the offset for ftp writes. globus_i_gass_copy_target_status_t globus_i_gass_copy_state_target_s::status signifies the target has been successfully setup globus_gass_copy_url_mode_t globus_i_gass_copy_state_target_s::mode mode used to identify the below target union struct. struct { ... } globus_i_gass_copy_state_target_s::ftp ftp specific data globus_gass_transfer_request_t globus_i_gass_copy_state_target_s::request GASS equivelent of a handle. struct { ... } globus_i_gass_copy_state_target_s::gass GASS specific data. globus_bool_t globus_i_gass_copy_state_target_s::free_handle If the IO handle was passed as an argument then FALSE If the IO handle was created internally then TRUE. globus_bool_t globus_i_gass_copy_state_target_s::seekable Can globus_io_file_seek() be performed on this handle? struct { ... } globus_i_gass_copy_state_target_s::io IO specific data. union { ... } globus_i_gass_copy_state_target_s::data data required to perform each type of transfer Author Generated automatically by Doxygen for globus gass copy from the source code. Version 8.4 Mon Apr 30 2012 globus_i_gass_copy_state_target_s(3)
All times are GMT -4. The time now is 03:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy