Sponsored Content
Top Forums Shell Programming and Scripting Perl scirpt for automatic file transfer Post 69400 by sveera on Thursday 14th of April 2005 12:27:20 PM
Old 04-14-2005
Power 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

unix automatic file transfer

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

Data transfer from DB2 to Sybase using Perl?

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

Using Public key in Shell scirpt

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

HPUX model scirpt issue

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

Perl automated file transfer

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

perl script to transfer newly generated files by scp

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

How to transfer file from one PC to another using PERL?

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

Csv format output file using scirpt

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

Scirpt to fetch the variable from sqlplus

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

Shell scirpt error

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
XtSelectionDoneIncrProc()												 XtSelectionDoneIncrProc()

Name
  XtSelectionDoneIncrProc - interface definition for procedure called when an incremental selection transfer completes.

Synopsis
  typedef void (*XtSelectionDoneIncrProc)(Widget, Atom *, Atom *,
  XtRequestId *, XtPointer);
	 Widget w;
	 Atom *selection;
	 Atom *target;
	 XtRequestId *request_id;
	 XtPointer client_data;

Inputs
  w	    Specifies the widget that owns the selection.

  selection Specifies the atom that names the selection being transferred.

  target    Specifies the target type to which the conversion was done.

  request_id
	    Identifies the specific conversion request that completed.

  client_data
	    Specifies data registered with this procedure when the widget took ownership of the selection.

Availability
  Release 4 and later.

Description
  An  XtSelectionDoneIncrProc  is  optionally  registered in a call to XtOwnSelectionIncremental(), and is called by the Intrinsics after the
  requestor has retrieved the final (zero-length) segment of the incremental transfer to indicate that the entire transfer is complete.   The
  w,  selection,  and  client_data  arguments are those passed to XtOwnSelectionIncremental().	The target and request_id arguments are those
  that were passed to the XtConvertSelectionIncrProc registered with this procedure.

  An XtSelectionDoneIncrProc should free any memory that was allocated for the transfer of the selection value.  If no	procedure  is  speci-
  fied,  the Intrinsics will automatically free (using XtFree()) the last value returned by the XtConvertSelectionIncrProc.  If a single buf-
  fer is used to transfer all the chunks of the selection, this automatic freeing by the Intrinsics should be sufficient.  If  separate  buf-
  fers	are used or other memory or resources are allocated to transfer the selection value, an XtSelectionDoneIncrProc should be provided to
  free them.

Usage
  It is usually more convenient to use the Intrinsics atomic selection transfer mechanism which transfers the selection  value	in  a  single
  chunk.  See XtOwnSelection(1) and XtSelectionDoneProc for more information.

See Also
  XtGetSelectionValueIncremental(1), XtGetSelectionValuesIncremental(1), XtOwnSelection(1), XtOwnSelectionIncremental(1),
  XtCancelConvertSelectionProc(2), XtConvertSelectionIncrProc(2), XtLoseSelectionIncrProc(2), XtSelectionDoneProc(2).

Xt - Selections 													 XtSelectionDoneIncrProc()
All times are GMT -4. The time now is 06:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy