Sponsored Content
Top Forums Shell Programming and Scripting Sending a file to 24 Server locations parallely Post 302395015 by vsmeruga on Sunday 14th of February 2010 11:09:10 AM
Old 02-14-2010
Sending a file to 24 Server locations parallely

Hi All,

I have to send a processed file to 24 different server locations. I feel, if this job can be done parallel in the background - Time will come down.

I found the script to FTP the file for a single server location through past Unix posts as below:
Code:
#!/usr/bin/ksh
ftp -v -n "ipaddress" 
user "Username" "Username"

cd /distant/directory
put filename
If error >> ${LOG}
mail -x john@gmail.com -s FTP failed to the server ${ipaddress}
else
echo "FTP Successful to the server ${ipaddress} >> ${LOG}
quit

How to automate the script to send the Source File to Different FTP Locations.

For eg: If I create a file with all the 24 different FTP Target Locations in "Filelist.txt" as below:
Code:
Filelist.txt:
------------
ipaddress,Username,password
172.90.232.1,john,john
172.90.232.2,john,john
172.90.232.3,john,john
172.90.232.4,john,john
.
.
.
172.90.232.24,john,john

And pass the above file values as parameters to the original FTP Script script.

Can some one help me how to implement this solution in Unix scripting will be appreciated.

Thanks,
vsmeruga.

Last edited by Scott; 02-14-2010 at 12:18 PM.. Reason: Code tags, please...
 

10 More Discussions You Might Find Interesting

1. Programming

sending file from server to client

hi dear i m very new to socket programing . i need the source code which sends file from server to client . i mean both server n client programe which sends file . can u do this for me please my email id is email id removed regards bilal (1 Reply)
Discussion started by: bilal
1 Replies

2. Solaris

file locations...

Hi Guys, There was a post that I saw here a while ago regarding file system layout and what to put where, which I am unable to find now.. A user here posted a man page that list what each partition should have in it and what it is used for and were you should install custom packages. ie:... (1 Reply)
Discussion started by: Tornado
1 Replies

3. Shell Programming and Scripting

executing 2 or more files inside another file parallely

hi All, i have 3 files file1 file2 file3 these 3 files are shell (KSH) scripts. i want to place all these 3 shell scripts in another file file99 and execute these files simultaneoulsy inside the file99 these 3 files should be present and executed simultaneously when i excute file99 (nohup... (1 Reply)
Discussion started by: dareman123
1 Replies

4. Solaris

Sending a file to a server

Dear Experts, please help i am very much confused here and not getting the right path, actually i want to send a file from client to a server, initially i used mmap() which is failing most of the time so i want to use general IO streams to do that, i can open a file in "rb" mode and read... (1 Reply)
Discussion started by: vin_pll
1 Replies

5. Shell Programming and Scripting

Perl and sending file to server

Hi, I am trying to write some test code for bigger project where my perl script will send file over to server. This is the current SERVER and CLIENT code I have so far. When I type "hi" from client I get hello back from server and like wise I send send command I get respond back the problem... (1 Reply)
Discussion started by: Dabheeruz
1 Replies

6. UNIX for Advanced & Expert Users

Insert Delimiter at fixed locations in a flat file

Hi Can somebody help me with solution for this PLEASE? I have a flat file and need to insert delimiters at fixed positions in all the lines so that I can easily convert into EXCEL with columns defined as per their width. For Example Here is the file { kkjhdhal sdfewss sdtereetyw... (7 Replies)
Discussion started by: jd_mca
7 Replies

7. Shell Programming and Scripting

Perl: Sending file from UNIX server to Windows server

I'm trying to write a Perl script where a file from a UNIX server box connects to a Windows server box and copies that file into the Window box. The main problem I have right now is that whenever I try to connect to the Windows box, the connection is refused. The error message that always pops... (2 Replies)
Discussion started by: kooshi
2 Replies

8. Shell Programming and Scripting

Inserting commas into file at set locations...

Hey everyone. What would be the best method to insert commas (or comma-quotes) into a file at set locations. Every line in the file looks like this: 1234567890123456 123456BIGAUDIODYNAMITE33 123.12 123456 12345678901234MARK E WILLIAMS 123456 The comma's should... (6 Replies)
Discussion started by: Astrocloud
6 Replies

9. UNIX for Dummies Questions & Answers

Edit locations in a file

Hi , I have a file which looks like this source1 LEN predictive 392879 394347 0.955489 + . Name=sa000003.1;ID=sa000003;Alias=sa121751.1; source1 LEN descriptive_1 391082 392878 . . . Parent=sa000003.1;supp_id=.1805.1; ... (3 Replies)
Discussion started by: siya@
3 Replies

10. Web Development

Sending file to WebDav Server

Hi All, I am using a webdav server host name : abc.xyz.com.ak username : user123 password : password123 port : 80 I need to send files stored in my windows system to the server, any idea how to do it. I dont know how to create a url in linux for webdav server using details. (2 Replies)
Discussion started by: prakhar_dubey
2 Replies
SGE_SHEPHERD(8) 				      Sun Grid Engine Administrative Commands					   SGE_SHEPHERD(8)

NAME
sge_shepherd - Sun Grid Engine single job controlling agent SYNOPSIS
sge_shepherd DESCRIPTION
sge_shepherd provides the parent process functionality for a single Sun Grid Engine job. The parent functionality is necessary on UNIX systems to retrieve resource usage information (see getrusage(2)) after a job has finished. In addition, the sge_shepherd forwards signals to the job, such as the signals for suspension, enabling, termination and the Sun Grid Engine checkpointing signal (see sge_ckpt(1) for details). The sge_shepherd receives information about the job to be started from the sge_execd(8). During the execution of the job it actually starts up to 5 child processes. First a prolog script is run if this feature is enabled by the prolog parameter in the cluster configura- tion. (See sge_conf(5).) Next a parallel environment startup procedure is run if the job is a parallel job. (See sge_pe(5) for more infor- mation.) After that, the job itself is run, followed by a parallel environment shutdown procedure for parallel jobs, and finally an epilog script if requested by the epilog parameter in the cluster configuration. The prolog and epilog scripts as well as the parallel environment startup and shutdown procedures are to be provided by the Sun Grid Engine administrator and are intended for site-specific actions to be taken before and after execution of the actual user job. After the job has finished and the epilog script is processed, sge_shepherd retrieves resource usage statistics about the job, places them in a job specific subdirectory of the sge_execd(8) spool directory for reporting through sge_execd(8) and finishes. sge_shepherd also places an exit status file in the spool directory. This exit status can be viewed with qacct -j JobId (see qacct(1)); it is not the exit status of sge_shepherd itself but of one of the methods executed by sge_shepherd. This exit status can have several mean- ings, depending on in which method an error occurred (if any). The possible methods are: prolog, parallel start, job, parallel stop, epi- log, suspend, restart, terminate, clean, migrate, and checkpoint. The following exit values are returned: 0 All methods: Operation was executed successfully. 99 Job script, prolog and epilog: When FORBID_RESCHEDULE is not set in the configuration (see sge_conf(5)), the job gets re-queued. Otherwise see "Other". 100 Job script, prolog and epilog: When FORBID_APPERROR is not set in the configuration (see sge_conf(5)), the job gets re-queued. Oth- erwise see "Other". Other Job script: This is the exit status of the job itself. No action is taken upon this exit status because the meaning of this exit status is not known. Prolog, epilog and parallel start: The queue is set to error state and the job is re-queued. Parallel stop: The queue is set to error state, but the job is not re-queued. It is assumed that the job itself ran successfully and only the clean up script failed. Suspend, restart, terminate, clean, and migrate: Always successful. Checkpoint: Success, except for kernel checkpointing: checkpoint was not successful, did not happen (but migration will happen by Sun Grid Engine). RESTRICTIONS
sge_shepherd should not be invoked manually, but only by sge_execd(8). FILES
sgepasswd contains a list of user names and their corresponding encrypted passwords. If available, the password file will be used by sge_shepherd. To change the contents of this file please use the sgepasswd command. It is not advised to change that file manu- ally. <execd_spool>/job_dir/<job_id> job specific directory SEE ALSO
sge_intro(1), sge_conf(5), sge_execd(8). COPYRIGHT
See sge_intro(1) for a full statement of rights and permissions. SGE 6.2u5 $Date$ SGE_SHEPHERD(8)
All times are GMT -4. The time now is 04:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy