Sponsored Content
Top Forums Shell Programming and Scripting How to capture 3 digit return code of ftp?? Post 302867147 by RudiC on Wednesday 23rd of October 2013 01:57:51 PM
Old 10-23-2013
man ftp:
Quote:
-v Verbose option forces ftp to show all responses from the remote server, as well as report on data transfer statistics.

-d Enables debugging.
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

return code on ftp if filesystem full??

Does anyone know what the return code will be if an ftp fails because the /var/tmp filesystem is full? AIX 4.3 (1 Reply)
Discussion started by: lawadm1
1 Replies

2. Shell Programming and Scripting

Capture Oracle return code in shell script

I am using the following code in my shell script list=`sqlplus -s $user/$pwd@$dbms<<EOF WHENEVER SQLERROR EXIT SQL.SQLCODE set pagesize 0 feedback off verify off heading off echo off select * from control_tbl where src_nm=$3 and extrct_nm=$4; exit SQL.SQLCODE; EOF` ERROR=$?... (1 Reply)
Discussion started by: Vikas Sood
1 Replies

3. Programming

getting the return code of forked child process (ftp)

Hi, From within my C++ program, I fork a child process and execl an ftp session (solaris), like this : std::string szStartCmd = "ftp -i -n -v 192.168.149.31"; int nExecRes = execl("/bin/sh", "sh", "-c", szStartCmd.c_str(), (char *)0); I use 2 pipes to communicate between my... (7 Replies)
Discussion started by: KittyJ
7 Replies

4. Shell Programming and Scripting

capture ftp return code..PLZ HELP

Hi all, i have written a code to ftp a file from one server to other.The ftp is happeneing successfully,but i am not able to capture the return code,to check if ftp has failed. plz help me to find out the return code....this is urgent below is the code i have written... (3 Replies)
Discussion started by: anju
3 Replies

5. UNIX for Dummies Questions & Answers

FTP Return Code

Hi All, I have a problem to identify the error code thrown by FTP Server while uploading files. The message is : ftp return 32. I couldn't find out what is the meaning of that. :confused: OS is Sun Solaris 2.10. Anyone can help? Thanks a lot (1 Reply)
Discussion started by: wilsonSurya
1 Replies

6. Shell Programming and Scripting

No return code in ftp mget script

I have a automated FTP script that gets a file using mget. I am using mget because the date will change on the file frequently. The mget works, however if I incorrectly type the file (e.g. if I want to get /dog123 and I enter /dg*) I do not receive and error code from in the FTP session. The... (1 Reply)
Discussion started by: dog123
1 Replies

7. UNIX Desktop Questions & Answers

ftp return code not working

below is my code , but for some reason the return part is not working, only file transfer is happening and no exit status is checked .please me help me to fix this code #!/bin/sh #set -vx ftp -nv sitelocation << ! user username password lcd localdir cd /remote dir mget *.* ... (4 Replies)
Discussion started by: gwrm
4 Replies

8. Shell Programming and Scripting

Comparing files and capture return code

Hi, I would like to compare 2 files, and have a return code write to a file. regardless of the files contents are the same the code should be writing to a file (if both files contents are same then return code 0). A simple example will be great :) Thanks (3 Replies)
Discussion started by: khchong
3 Replies

9. Shell Programming and Scripting

How to capture script return code?

Hi I am executing database backup via shell script (Korn). The backup log is long, but I would like to capture only the last line so I can send an email if it fails Example of failed backup (only last 3 lines) BR0056I End of database backup: bejbofoh.aff 2012-07-26 07.31.21 BR0280I... (7 Replies)
Discussion started by: nimo
7 Replies

10. Shell Programming and Scripting

Script to retry FTP commands if unsuccessful and capture the failure status code.

I am using the below code to ftp file onto another server FTP_LOG_FILE=${CURR_PRG_NAME}- ${FTP_FILE}-`date +%Y%m%d%H%M%S`.log ftp -ivn ${FTP_HOST} ${FTP_PORT} << ENDFTP >> ${EDI_LOG_DIR}/${FTP_LOG_FILE} 2>&1 user ${FTP_USER} ${FTP_PSWD} lcd... (2 Replies)
Discussion started by: akashdeepak
2 Replies
snarf(1)						      General Commands Manual							  snarf(1)

NAME
snarf - Simple Non-interactive All-purpose Resource Fetcher SYNOPSIS
snarf [-avqprzm] URL [outfile] ... DESCRIPTION
Retrieves data from a variety of protocols, namely http, ftp, and gopher. USAGE
snarf is invoked with any number of URLs and outfiles. If an outfile is not specified, snarf preserves the remote file name when saving. For example, snarf http://foo.bar.com/images/face.gif will retrieve the file ``face.gif'' to the local system. In the event that there is no filename (the url ends in a slash), the data is retrieved and stored in the file index.html for http URLs, ftpindex.txt for ftp URLs, or gopherindex.txt for gopher URLs. Using a dash, "-", as the outfile causes snarf to send its output to stdout rather than a file. To log in to an ftp server or website that requires a username and password, use the syntax http://username:password@site.com/. If you omit the password, you will be prompted for it. Snarf has a built-in option to download the latest version of itself; simply run snarf LATEST. OPTIONS -a Causes snarf to use "active" ftp. By default, snarf uses passive ftp, and, if the server does not support it, falls back to active ftp. Using the -a option will avoid the initial passive attempt. -r Resumes an interrupted ftp or http transfer by checking if there is a local file with the same name as the remote file, and starting the transfer at the end of the local file and continuing until finished. This option only works with HTTP servers that understand HTTP/1.1 and ftp servers that support the REST command. snarf uses this option automatically if the outfile already exists. -n Don't resume; ignore the outfile if it exists and re-transfer it in its entirety. -q Don't print progress bars. -p Forces printing of progress bars. Snarf has a compile-time option for whether progress bars print by default or not. The -p option overrides the -q option. In addition, if progress bars are enabled by default, snarf suppresses them when standard output is not a terminal. Using -p will override this behavior. -v Prints all messages that come from the server to stderr. -z Send a user-agent string similar to what Netscape Navigator 4.0 uses. -m Send a user-agent string similar to what Microsoft Internet Explorer uses. Each option only affects the URL that immediately follows it. To have an option affect all URLs that follow it, use an uppercase letter for the option, e.g. -Q instead of -q. ENVIRONMENT
Snarf checks several environment variables when deciding what to use for a proxy. It checks a service-specific variable first, then SNARF_PROXY, then PROXY. The service-specific variables are HTTP_PROXY, FTP_PROXY, and GOPHER_PROXY. Snarf also checks the SNARF_HTTP_USER_AGENT environment variable and will use it when reporting its user-agent string to an HTTP server. In the same spirit, it also uses the SNARF_HTTP_REFERER environment variable to spoof a Referer to the web server. BUGS
Bugs? What bugs? If you find 'em, report 'em. AUTHOR
Copyright (C) 2000 Zachary Beane (xach@xach.com) 17 Jun 2000 snarf(1)
All times are GMT -4. The time now is 08:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy