Sponsored Content
Full Discussion: automate an ftp job
Top Forums UNIX for Dummies Questions & Answers automate an ftp job Post 24993 by flowrats on Tuesday 23rd of July 2002 09:00:59 AM
Old 07-23-2002
RTM,

I guess the best way to put it is that the format of the file is text format, but the file discriptor (name of the file) begins and ends with a single quote, and has decimials in the name.

So I assume that when I get the file I have to use the ecape charator, unlike I would manually to get a file with a quote in it:

manualy I would type get '111.222.333.444.555'
but in a script I would type: get \'111.222.333.444.555\'

flowrats
flowrats
 

10 More Discussions You Might Find Interesting

1. Answers to Frequently Asked Questions

Automate FTP / Scripting FTP Transfers

One of our most frequent questions is how to automate ftp transfers. There are several approaches. Since I'm writing this post, we will start with my favorite technique. :) In Automated FTP task I present a simple example of my ksh co-process technique. And note that later in this thread I... (0 Replies)
Discussion started by: Perderabo
0 Replies

2. UNIX for Advanced & Expert Users

Automate FTP

Hi all, I got this piece of code in this forum and I can't seem to get it work. The thread already closed so I just post a new thread. #!/usr/bin/ksh ftp -v -n "YOUR.IP.ADD.RESS" << cmd user "user" "passwd" cd /distant/directory lcd /local/directoryget ssh_install get ( or put) your... (4 Replies)
Discussion started by: CamTu
4 Replies

3. Shell Programming and Scripting

How to automate an FTP process?

Hello script experts, I am newbie to shell script. But I have to write a shell script (ASAP) where I need to ftp a file on daily basis to a remote server, and send an email with final status. I I should have a properties file with hostname, Userid, and pwd. And a shall script file should read... (1 Reply)
Discussion started by: ksak
1 Replies

4. Shell Programming and Scripting

Automate FTP

Hi, Currently, i am using sftp manully to transfer files between two secure servers. Can anyone provide me a sample shell script which can automate the sftp process? (11 Replies)
Discussion started by: borncrazy
11 Replies

5. Shell Programming and Scripting

Automate daily FTP files

How to automate FTP files daily with the following constraints 1) Try (every 15 mins or 30 mins) FTP till it reconnects 2) Files that arrive in between 5:30 pm and 2:00 am 3) The sat and sun, mon files are to be FTP on monday. 4) Only the txt files are to be FTP'ed. The following are the... (2 Replies)
Discussion started by: bobbygsk
2 Replies

6. IP Networking

Automate FTP process and autorestart on link failure

Hi Guys, i have this lil challenge; i am to implement an automated script that searches/scans a directory for files then picks and sends this files to a very remote server via an ftp link. the challenge here is that the ftp link fails due to netwrk issues maybe; i therefore need to develop... (5 Replies)
Discussion started by: sdcoms
5 Replies

7. Shell Programming and Scripting

How to automate ftp in perl

My situations is I cannot use NET::ftp. So I need to have a way to automate ftp. I know how to do it in ksh: #!/usr/bin/ksh ftp -i -v -n $host_name <<_FTP >> $log_file 2>&1 user $user_name lcd $local_dir cd $remote_dir put $file_name bye _FTP But how can I do it in perl? Note:... (6 Replies)
Discussion started by: egyfan
6 Replies

8. UNIX for Advanced & Expert Users

TO Automate the FTP process

Plzz Some One Help in this matter I have scripts to load the data into tables and to copy files from ftp to our system. we use to run the scripts every day.... we hav the files in the FTP server and we hav to bring the files to our system and we hav to load the data into the tables. We... (0 Replies)
Discussion started by: nani1984
0 Replies

9. Shell Programming and Scripting

Automate Job monitoring

Hi, I have a project which i need to automate some manual work. We have a 100 jobs in Linux and Unix environment. We do job monitoring daily. that is taking more that 2 to 3 hrs for us because we use autorep -j <jobname> command for each and every job. That takes more time for us to do. We have... (16 Replies)
Discussion started by: cg_saran
16 Replies

10. Shell Programming and Scripting

Automate [ls]ftp

Heyas Seen some of the ftp posts here and knowing i'll be writing a script using ftp soon, so i thought i'd write a script to automate, or at least simplify some basic tasks with it. I'm currently stuck at handling active/passiv modes. Neither lftp nor sftp seem to support them by arguments,... (3 Replies)
Discussion started by: sea
3 Replies
REDUCE(3PVM)							  PVM Version 3.4						      REDUCE(3PVM)

NAME
pvm_reduce - Performs a reduction operation over members of the specified group. SYNOPSIS
C int info = pvm_reduce( void (*func)(), void *data, int count, int datatype, int msgtag, char *group, int rootginst) Fortran call pvmfreduce(func, data, count, datatype, msgtag, group, rootginst, info) PARAMETERS
func Function which defines the operation performed on the global data. Predefined are PvmMax, PvmMin, PvmSum, and PvmProduct. Users can define their own function. SYNOPSIS for func C void func(int *datatype, void *x, void *y, int *num, int *info) Fortran call func(datatype, x, y, num, info) data Pointer to the starting address of an array of local values. On return, the data array on the root will be overwritten with the result of the reduce operation over the group. For the other (non-root) members of the group the values of the data array upon return from the reduce operation are not defined; the values may be different than those originally passed to pvm_reduce. count Integer specifying the number of elements of datatype in the data array. The value of count should agree between all members of the group. datatype Integer specifying the type of the entries in the data array. (See below for defined types.) msgtag Integer message tag supplied by the user. msgtag should be >= 0. It allows the user's program to distinguish between different kinds of messages. group Character string group name of an existing group. rootginst Integer instance number of group member who gets the result. info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
pvm_reduce() performs global operations such as max, min, sum, or a user provided operation on the data provided by the members of a group. All group members call pvm_reduce with the same size local data array which may contain one or more entries. The root task is identified by its instance number in the group. The inner workings of the pvm_reduce call are implementation dependent; however, when the pvm_reduce call completes, the root's data array will be equal to the specified operation applied element-wise to the data arrays of all the group members. A broadcast by the root can be used if the other members of the group need the resultant value(s). PVM supplies the following predefined functions that can be specified in func. PvmMin PvmMax PvmSum PvmProduct PvmMax and PvmMin are implemented for all the datatypes listed below. For complex values the minimum [maximum] is that complex pair with the minimum [maximum] modulus. PvmSum and PvmProduct are implemented for all the datatypes listed below with the exception of PVM_BYTE and BYTE1. C and Fortran defined datatypes are: C datatypes FORTRAN datatypes ----------------------------------- PVM_BYTE BYTE1 PVM_SHORT INTEGER2 PVM_INT INTEGER4 PVM_FLOAT REAL4 PVM_CPLX COMPLEX8 PVM_DOUBLE REAL8 PVM_DCPLX COMPLEX16 PVM_LONG A user defined function may be used in func. The argument func is a function with four arguments. It is the base function used for the reduction operation. Both x and y are arrays of type specified by datatype with num entries. The arguments datatype and info are as spec- ified above. The arguments x and num correspond to data and count above. The argument y contains received values. Caveat: pvm_reduce() does not block, a call to pvm_barrier may be necessary. For example, an error may occur if a task calls pvm_reduce and then leaves the group before the root has completed its call to pvm_reduce. Similarly, an error may occur if a task joins the group after the root has issued its call to pvm_reduce. Synchronization of the tasks (such as a call to pvm_barrier) was not included within the pvm_reduce implementation since this overhead is unnecessary in many user codes (which may already synchronize the tasks for other pur- poses). The current algorithm is very simple and robust. A future implementation may make more efficient use of the architecture to allow greater parallelism. ILLUSTRATION
The following example illustrates a call to pvm_reduce. Suppose you have three group members (instance numbers 0, 1, 2) with an array called Idata with 5 values as specified: instance the 5 values in the integer array 0 1, 2, 3, 4, 5 1 10, 20, 30, 40, 50 2 100, 200, 300, 400, 500 And, suppose that a call to reduce (such as the ones following) are issued where the root is the group member with instance value of 1: C: root = 1; info = pvm_reduce(PvmSum, &Idata, 5, PVM_INT, msgtag, "worker", root); Fortran: root = 1 call pvmfreduce(PvmSum, Idata, 5, INTEGER4, msgtag, "worker", root, info) Then, upon completion of the reduce call, the following will result: instance the 5 values in the integer array 0 .... not defined....... 1 111, 222, 333, 444, 555 2 .... not defined ...... EXAMPLES
C: info = pvm_reduce(PvmMax, &myvals, 10, PVM_FLOAT, msgtag, "worker", rootginst); Fortran: CALL PVMFREDUCE(PvmMax, MYVALS, COUNT, REAL4, & MTAG, 'worker', ROOT, INFO) ERRORS
These error conditions can be returned by pvm_reduce PvmNoInst Calling task is not in the group PvmBadParam The datatype specified is not appropriate for the specified reduction function. PvmSysErr Pvm system error SEE ALSO
pvm_bcast(3PVM), pvm_barrier(3PVM), pvm_psend(3PVM) 6 February, 1995 REDUCE(3PVM)
All times are GMT -4. The time now is 11:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy