Sponsored Content
Top Forums Shell Programming and Scripting How to run multiple functions in Background in UNIX Shell Scripting? Post 302814957 by DGPickett on Thursday 30th of May 2013 04:49:32 PM
Old 05-30-2013
Delay is not the point, you start all independent tasks and then dependent tasks for each are arranged to wait for all their precedents. Now, only one process can wait for each running process, so if many processed need to know what is done, a log file, directory of marker files or other database can track progress, and you can check progress in a loop every N seconds. You could write a supervisor that knows the prereqs of every new process. You could put the prereqs in a SQL db, same db as the completions, so you can query what is not run and no prereq is missing, and launch any found. You would be writing ControlM or Tivoli TWS and such.
This User Gave Thanks to DGPickett For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

run a shell in the background

How can I run a shell in the background? cat test.sh #!/bin/sh sleep 600 Thank u very much indeed! (2 Replies)
Discussion started by: GCTEII
2 Replies

2. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

3. Shell Programming and Scripting

Background Process Shell Scripting

I have a following program: echofunc() { filename=$1 echo "reading $filename" while read line do echo $line; sleep 6; done < $filename } split -5 new.dat ls x* > input.dat while read file do echofun $file & done < input.dat (3 Replies)
Discussion started by: dhieraj
3 Replies

4. Shell Programming and Scripting

Run Multiple Functions over SSH (BASH)

I am trying to write a script that will ssh into a remote machine and recurse through a specified directory, find mp3 files which may be two or three directories deep (think iTunes: music/artist/album/song.mp3), and scp them back to the machine running the script. The script should also maintain... (3 Replies)
Discussion started by: johnnybg00de
3 Replies

5. Shell Programming and Scripting

background functions doesn't display their output

hello there, there's a function, in my shell script, i'd like to run in the background. here's an example: log() { local SELF=${0##*/} tty -s && echo ": $*" } some_func() { # do something log "This text is not displayed in the terminal's output when running in the... (1 Reply)
Discussion started by: Shedon
1 Replies

6. Shell Programming and Scripting

shell script does not work if run in background

Dear All, I am trying to run a script in background like ./scriptname.sh & but when i try to run it in background it is giving me an error "syntax error at line 12: `(' unexpected" at the line 12, there is a function definition "function getFileList()". This script runs fine if i run on... (2 Replies)
Discussion started by: bilalghazi
2 Replies

7. Shell Programming and Scripting

Shell scripting issue-running the background script

I have written the below query to genrate a telephone.I am passing account number from oracle database. I am calling 2 scripts which generate the bill 1. bip.sh (it runs in the background) 2.runXitInvoice_PROFORMA_integ bip.sh generates a number which runXitInvoice_PROFORMA_integ uses.How... (7 Replies)
Discussion started by: rafa_fed2
7 Replies

8. UNIX for Beginners Questions & Answers

How to run a shell script in background without showing in the terminal?

Hi Guys, i am having a script which checks for ip address is pingable or not,when i execute this script in terminal it keeps on showing the pinging status of every ip address and it takes more time when i check for 100 ip address,How to do run a script in background without showing in the terminal... (4 Replies)
Discussion started by: Meeran Rizvi
4 Replies

9. Shell Programming and Scripting

Shell script to apply functions to multiple columns dynamically

Hello, I have a requirement to apply hashing algorithm on flat file on one or more columns dynamically based on header sample input file ID|NAME|AGE|GENDER 10|ABC|30|M 20|DEF|20|F say if i want multiple columns based on the header example id,name or id,age or name,gender and hash and... (13 Replies)
Discussion started by: mkathi
13 Replies

10. UNIX for Beginners Questions & Answers

Export Oracle multiple tables to multiple csv files using UNIX shell scripting

Hello All, just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table. Can you please suggest why? or any better idea? export FILE="/abc/autom/file/geo_JOB.csv" Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies
CPAN::Meta::Prereqs(3)					User Contributed Perl Documentation				    CPAN::Meta::Prereqs(3)

NAME
CPAN::Meta::Prereqs - a set of distribution prerequisites by phase and type VERSION
version 2.120921 DESCRIPTION
A CPAN::Meta::Prereqs object represents the prerequisites for a CPAN distribution or one of its optional features. Each set of prereqs is organized by phase and type, as described in CPAN::Meta::Prereqs. METHODS
new my $prereq = CPAN::Meta::Prereqs->new( \%prereq_spec ); This method returns a new set of Prereqs. The input should look like the contents of the "prereqs" field described in CPAN::Meta::Spec, meaning something more or less like this: my $prereq = CPAN::Meta::Prereqs->new({ runtime => { requires => { 'Some::Module' => '1.234', ..., }, ..., }, ..., }); You can also construct an empty set of prereqs with: my $prereqs = CPAN::Meta::Prereqs->new; This empty set of prereqs is useful for accumulating new prereqs before finally dumping the whole set into a structure or string. requirements_for my $requirements = $prereqs->requirements_for( $phase, $type ); This method returns a CPAN::Meta::Requirements object for the given phase/type combination. If no prerequisites are registered for that combination, a new CPAN::Meta::Requirements object will be returned, and it may be added to as needed. If $phase or $type are undefined or otherwise invalid, an exception will be raised. with_merged_prereqs my $new_prereqs = $prereqs->with_merged_prereqs( $other_prereqs ); my $new_prereqs = $prereqs->with_merged_prereqs( @other_prereqs ); This method returns a new CPAN::Meta::Prereqs objects in which all the other prerequisites given are merged into the current set. This is primarily provided for combining a distribution's core prereqs with the prereqs of one of its optional features. The new prereqs object has no ties to the originals, and altering it further will not alter them. as_string_hash This method returns a hashref containing structures suitable for dumping into a distmeta data structure. It is made up of hashes and strings, only; there will be no Prereqs, CPAN::Meta::Requirements, or "version" objects inside it. is_finalized This method returns true if the set of prereqs has been marked "finalized," and cannot be altered. finalize Calling "finalize" on a Prereqs object will close it for further modification. Attempting to make any changes that would actually alter the prereqs will result in an exception being thrown. clone my $cloned_prereqs = $prereqs->clone; This method returns a Prereqs object that is identical to the original object, but can be altered without affecting the original object. Finalization does not survive cloning, meaning that you may clone a finalized set of prereqs and then modify the clone. BUGS
Please report any bugs or feature using the CPAN Request Tracker. Bugs can be submitted through the web interface at http://rt.cpan.org/Dist/Display.html?Queue=CPAN-Meta <http://rt.cpan.org/Dist/Display.html?Queue=CPAN-Meta> When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. AUTHORS
o David Golden <dagolden@cpan.org> o Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by David Golden and Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.16.2 2012-04-01 CPAN::Meta::Prereqs(3)
All times are GMT -4. The time now is 02:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy