Concurrent Processing in Perl Scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Concurrent Processing in Perl Scripting
# 1  
Old 02-15-2011
Concurrent Processing in Perl Scripting

We are trying to scp files from machine A to machine B. We want to copy the files in the rate using the file original timestamps. Sometimes files have the same time stamp. So we want to start scp for all files with the same time stamp at the same time.

I like to get some opinion on using Perl vs Java. Which one is earlier to using(I would think it's java) and which one runs more efficient in Linux env.

If using Perl, can I use threads feature to kick off a thread for each copy? Anyone has a sample loop(scp a list of files) code using thread? Any other suggestion? Can I use system command to start scp's, then keep track of the pids(since we want to log the time stamps for start and end of the scp operation)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parallel processing in AIX (bash shell scripting)

Hi all, I am struggling to build a utility which can do the parallel processing. I achieved same in Linux using xargs -P but same is not working on AIX. I am building file copy utility where I will have all required info in a file (like souce file info and target location details), now i need... (2 Replies)
Discussion started by: ankur singh
2 Replies

2. AIX

Difference between concurrent and enhanced concurrent VG

Hi, What are the differences between concurrent and enhanced concurrent VGs.? Any advantages of enhanced concurrent VG over normal concurrent vg Regards, Siva (2 Replies)
Discussion started by: ksgnathan
2 Replies

3. Shell Programming and Scripting

PARALLEL PROCESSING IN PERL

HI All, I have scenerio where I need to call sub modules through for loop for (i=0; i<30 ;i++) { .. .. .. subroutine 1; subroutine 2; } I want this to be run in parallel process1 { ... ... subroutine 1; subroutine 2; (0 Replies)
Discussion started by: gvk25
0 Replies

4. Shell Programming and Scripting

text processing and filtering scripting

Still new to bash. Using debian lenny 5, bash version 3.2.39. I'm working on three scripts. I need help completing them. One script that inputs a plain text file, echo then chop it up into separate whitespace-delimited strings as an output. Not sure how to do this... for example, the... (4 Replies)
Discussion started by: l20N1N
4 Replies

5. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

6. Shell Programming and Scripting

Perl file processing

I have an input array like : "SVR1" GRP="EVT_BOX06B" SRID=100 MIN=2 "SVR1" GRP="EVT_BOX06B" SRID=200 MIN=1 "SVR2" GRP="ADM_BOX06B" SRID=100 MIN=1 "SVR1" GRP="EVT_BOX88B" SRID=100 MIN=2 "SVR1" GRP="EVT_BOX88B" SRID=200 MIN=1... (4 Replies)
Discussion started by: deo_kaustubh
4 Replies

7. Shell Programming and Scripting

Processing a file in perl

Qspace ABC Queue doCol: true Queue order: fifo Queue setCol: red Queue order: fifo Qspace XYZ Queue getCol: true Queue order: fifo I need to append every line in this file with Qspace & Queue, so that final o/p shall look like this, Qspace: ABC Queue: doCol Qspace: ABC Queue: doCol... (2 Replies)
Discussion started by: deo_kaustubh
2 Replies

8. Shell Programming and Scripting

shell scripting-processing multiple scripts

I have four scripts to run. My 1st script will make script2 and script3 to run. I am setting a cron job for this script1 to run continuously. This script1 will check for 2 text files and based on the existance of those text files it will initiate the script2 and script3. Now my doubt is that... (2 Replies)
Discussion started by: RSC1985
2 Replies

9. Shell Programming and Scripting

File processing on perl

Hey everyone ... I wanted to process the contents of a file, as in modify its contents. whats the best way to do it on perl? In more detail I hav to go through the contents of the file, match patterns n then modify the contents of the same file depending on the matching results. Any help is... (2 Replies)
Discussion started by: garric
2 Replies

10. Shell Programming and Scripting

threads - concurrent processing

i have a program which uses a java thread that concurrently copies table data with many DB connections (one for each thread) new to unix, wanted to know if its possible to do a similar thing in a shell script. for eg script.sh trigger 2 stored procs at the same time which are... (6 Replies)
Discussion started by: siva_jm
6 Replies
Login or Register to Ask a Question
SCP(1)							    BSD General Commands Manual 						    SCP(1)

NAME
scp -- secure copy (remote file copy program) SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same secu- rity as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if they are needed for authentication. File names may contain a user and host specification to indicate that the file is to be copied to/from that host. Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing ':' as host specifiers. Copies between two remote hosts are also permitted. The options are as follows: -1 Forces scp to use protocol 1. -2 Forces scp to use protocol 2. -4 Forces scp to use IPv4 addresses only. -6 Forces scp to use IPv6 addresses only. -B Selects batch mode (prevents asking for passwords or passphrases). -C Compression enable. Passes the -C flag to ssh(1) to enable compression. -c cipher Selects the cipher to use for encrypting the data transfer. This option is directly passed to ssh(1). -F ssh_config Specifies an alternative per-user configuration file for ssh. This option is directly passed to ssh(1). -i identity_file Selects the file from which the identity (private key) for public key authentication is read. This option is directly passed to ssh(1). -l limit Limits the used bandwidth, specified in Kbit/s. -o ssh_option Can be used to pass options to ssh in the format used in ssh_config(5). This is useful for specifying options for which there is no separate scp command-line flag. For full details of the options listed below, and their possible values, see ssh_config(5). AddressFamily BatchMode BindAddress ChallengeResponseAuthentication CheckHostIP Cipher Ciphers Compression CompressionLevel ConnectionAttempts ConnectTimeout ControlMaster ControlPath GlobalKnownHostsFile GSSAPIAuthentication GSSAPIDelegateCredentials HashKnownHosts Host HostbasedAuthentication HostKeyAlgorithms HostKeyAlias HostName IdentityFile IdentitiesOnly KbdInteractiveDevices LogLevel MACs NoHostAuthenticationForLocalhost NumberOfPasswordPrompts PasswordAuthentication PKCS11Provider Port PreferredAuthentications Protocol ProxyCommand PubkeyAuthentication RekeyLimit RhostsRSAAuthentication RSAAuthentication SendEnv ServerAliveInterval ServerAliveCountMax StrictHostKeyChecking TCPKeepAlive UsePrivilegedPort User UserKnownHostsFile VerifyHostKeyDNS -P port Specifies the port to connect to on the remote host. Note that this option is written with a capital 'P', because -p is already reserved for preserving the times and modes of the file in rcp(1). -p Preserves modification times, access times, and modes from the original file. -q Quiet mode: disables the progress meter as well as warning and diagnostic messages from ssh(1). -r Recursively copy entire directories. Note that scp follows symbolic links encountered in the tree traversal. -S program Name of program to use for the encrypted connection. The program must understand ssh(1) options. -v Verbose mode. Causes scp and ssh(1) to print debugging messages about their progress. This is helpful in debugging connection, authentication, and configuration problems. The scp utility exits 0 on success, and >0 if an error occurs. SEE ALSO
rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh_config(5), sshd(8) HISTORY
scp is based on the rcp(1) program in BSD source code from the Regents of the University of California. AUTHORS
Timo Rinne <tri@iki.fi> Tatu Ylonen <ylo@cs.hut.fi> BSD
February 8, 2010 BSD