|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Wrapper Script Help With Perl Scripts
I have tried looking through wrapper scripts throughout the forum, but I don't think they were able to answer my question (either that or I'm just confused).
Basically, I have a Perl script that I want to run in parallel 4 times with parameters, wait for all of them to finish, then run another script. Ex. perl test.pl input1.txt output1.txt && perl test.pl input2.txt output2.txt && ....etc. How would I do this? Any help is greatly appreciated! |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
Code:
#!/bin/sh
for N in 1 2 3 4
do
perl test.pl input${N}.txt output${N}.txt &
done
wait |
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
Sorry, I should've been more specific.
I would also like to run this script in a Windows environment. Preferably, I would like to avoid using UNIX environments (ex. Cygwin) since I'll be running this in a Windows environment. As far as I'm aware, .sh scripts don't work in Windows (unless I missed something...). My Perl scripts all run fine; just need to get the wrapping script all set up and I'll be good to go. |
|
#4
|
|||
|
|||
|
use Perl threads or I think Windows powershell can handle this.
|
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Hmm, crud, Perl threads... I haven't done threading for a long time...
Well, if it works, then that's what I will have to refresh my memory with. Many thanks!! ![]() |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Does fork() work on Windows?
|
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Count script wrapper help | richsark | Shell Programming and Scripting | 19 | 05-05-2009 05:42 PM |
| wrapper script in perl | richsark | Shell Programming and Scripting | 5 | 03-23-2009 03:41 PM |
| Help with a wrapper script not working | richsark | Shell Programming and Scripting | 0 | 03-09-2009 12:49 PM |
| New wrapper script will be developed to wrap two ksh scripts | ishai82 | Shell Programming and Scripting | 3 | 03-17-2008 03:45 AM |
| What is a wrapper script | thana | UNIX for Dummies Questions & Answers | 1 | 01-28-2008 07:11 AM |
|
|