04-14-2005
perl ftp
Hi cbkihong,
I am doing an iteration on each file in the local directory and then if the ftp fails then i am doing a retry for a fixed number of times.
if ftp fails the first time then i am saying continue to the next trial
or else to break.
for this i wrote the code as
===============
for($try=1;$try<=$retry_file_ftp;$try++)
{
print "filename is ::$i\n";
$ftp->put("$local_directory/$i") or $newerr=1;
if ($newerr ==1)
continue;
else
break;
}
}
==================
but its giving some syntax error at continue.
i am not able to figure it out .
can u please help ?
thanks in advance
bye
srini
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello,
I am a beginner with korn shell scripting. I have got a text file that gets produced every night and I need to transfer it to a windows shared area.
Is there any command line script (e.g FTP) that I could use to transfer the file automatically without manual intervention everyday?
Any... (4 Replies)
Discussion started by: tagem
4 Replies
2. Shell Programming and Scripting
Hi,
Good Morning everybody.
I need to write a perl script which will get some data from DB2 table and then put it into Sybase table. I have the experience in Oracle and Unix but new to these perl, DB2 and Sybase technologies.
Appreciate if any one can suggest with a sample code.
Thanks... (1 Reply)
Discussion started by: rajus19
1 Replies
3. Shell Programming and Scripting
Hi,
Can anyone help me out how to login on server using public key autorization.I want to use this on system.
Thanks in advance. (1 Reply)
Discussion started by: LochanM
1 Replies
4. HP-UX
hi,
I am using HPUX 11.31(Itanium) and HP 5100 printer.
I am using PCL5.nloo model script present in HPUX by default to print to printer.
I am finding issues in printing paper sizes and few other options.
Description of the problem:
When i give a print with option "half" and "Legal"... (4 Replies)
Discussion started by: meeraramanathan
4 Replies
5. Shell Programming and Scripting
Hi,
Firstly, I have no experience (at all) with shell scripting. So please, go easy on me :)
I did a search for what I was looking for although there were a few things available here and on the net I couldn't find anything tailored to what I am looking for.
Simply put, I have two servers.... (2 Replies)
Discussion started by: lastrider
2 Replies
6. UNIX for Advanced & Expert Users
Hi all,
I have root directory on server 1 say A and having sub directory B now my application generates output files and put in sub directory B.
now i need to transfer these files from server1 to server2 by scp which is having same directory structure A and sub directory B
I have tried... (2 Replies)
Discussion started by: tushar_spatil
2 Replies
7. Shell Programming and Scripting
Hi All
I have two PC connected with each other via LAN cable.
In one of the PC the Perl is installed. What I want to do is transfer the data from one PC to another via Perl.
Is it possible to do this.
---------- Post updated at 11:31 PM ---------- Previous update was at 07:01 AM ----------... (10 Replies)
Discussion started by: parthmittal2007
10 Replies
8. Shell Programming and Scripting
Hi All,
I get the test result file daily after running the main test script. from the resultfile, need to fetch only server info and status and put them in tabular format in a file and as well in CSV format output file.
I tried using awk command but am not able to put them in tabluar... (6 Replies)
Discussion started by: Optimus81
6 Replies
9. Shell Programming and Scripting
Hi Gurus,
I am stuck with the step where i need to fetch the location & sales from the below procedure by taking it from table field using the for loop. any idea how this can be done in unix. From one column both the location and sales are taken out.
create or replace procedure newyork... (2 Replies)
Discussion started by: arun888
2 Replies
10. Shell Programming and Scripting
I am not getting 1 for the failure scenario for my below code. any help would be greatly appreciated. If the input is invalid i should get exit. But in the below scenario i am not getting the message exit o.
ksh -x client_check.ksh sun
+ + hostname
hn=us
+ ]
+
client_check.ksh: test:... (6 Replies)
Discussion started by: arun888
6 Replies
LEARN ABOUT DEBIAN
ecaccess-ectrans-restart
ECACCESS-ECTRANS-RESTART(1p) User Contributed Perl Documentation ECACCESS-ECTRANS-RESTART(1p)
NAME
ecaccess-ectrans-restart - Restart an existing ECtrans transfer
SYNOPSIS
ecaccess-ectrans-restart -version|-help|-manual
ecaccess-ectrans-restart [-debug] [-gateway name] [-remote location] [-target file-name] [-retryCount number] [-retryFrequency frequency]
[-priority priority] [-lifeTime duration] [-mailTo email] [-onSuccess] [-onFailure] [-onRetry] [-keep] [-reject|-append|-resume|-overwrite]
[-maximumDuration duration] [-minimumDuration duration] [-minimumRate rate] ectrans-id
DESCRIPTION
Allow restarting the ECtrans transfer with the ectrans-id identifier.
In order to get the list of ECtrans transfers and the corresponding ectrans-id please use the ecaccess-ectrans-list command. If you want to
setup an ECtrans transfer then use the ecaccess-ectrans-request command which will give you an ectrans-id (this one can be kept for a later
restart).
ARGUMENTS
ectrans-id
The identifier of the ECtrans transfer to restart.
OPTIONS
-gateway name
Update the name of the ECaccess Gateway.
-remote location
Update the target location in the format association-name[@protocol].
-target file-name
Update the target file-name.
-retryCount number
Update the number of retries.
-retryFrequency frequency
Update the frequency of retries in seconds.
-priority priority
Update the transmission priority 0-99.
-lifeTime duration
Update the lifetime of the transfer request. The duration is specified in [w]eeks, [d]ays, [h]ours, [m]inutes or [s]econds (e.g. 1w
or 2d).
-mailTo email
Update the target email address.
-onSuccess
Allow sending a mail when the transfer is successful.
-onFailure
Allow sending a mail when the transfer has failed.
-onRetry
Allow sending a mail when the transfer is retried.
-keep Allow keeping the request in the spool until the duration specified in the -lifeTime option has passed. By default a successful
transfer is removed from the spool.
-reject Allow failing if there is an existing target file.
-append Allow appending if there is an existing target file.
-resume Allow resuming if there is an existing target file.
-overwrite
Allow overwriting if there is an existing target file.
-maximumDuration duration
Allow updating the maximum transfer duration. The duration is specified in [w]eeks, [d]ays, [h]ours, [m]inutes or [s]econds (e.g.
10m or 1h). A value <=0 will deactivate the feature.
-minimumDuration duration
Allow updating the duration before to control a transmission (e.g. for the first 10 minutes ECtrans don't try to check the transfer
rate, which allow not to enforce some minimum transfer rates for very small files). The duration is specified in [w]eeks, [d]ays,
[h]ours, [m]inutes or [s]econds (e.g. 30s or 10m). A value <=0 will deactivate the feature.
-minimumRate rate
Allow updating the minimum transfer rate for a transmission (expressed in bytes/s). This is an average value, not the transmission
rate at one particular moment in time (e.g. if a big file is stuck for 5 minutes but then transmit much faster later on then it
will not be interrupted as long as the overall transfer rate is above the minimum). A value <=0 will deactivate the feature.
-version
Display version number and exits.
-help Print a brief help message and exits.
-manual Prints the manual page and exits.
-debug Display the SOAP messages exchanged.
EXAMPLES
ecaccess-ectrans-restart 124356
Restart the ECtrans transfer with the identifier 124356.
SEE ALSO
ecaccess-ectrans-delete, ecaccess-ectrans-list, ecaccess-ectrans-request and ecaccess.
perl v5.14.2 2012-04-16 ECACCESS-ECTRANS-RESTART(1p)