Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Automating execution of shell scriptsby roboticus (Chancellor) |
on Aug 30, 2021 at 13:42 UTC ( [id://11136208]=note: print w/replies, xml ) | Need Help?? |
From your description, it sounds like you have all the information you need in the first script to run the second script, so I'd suggest either wrapping things up into a single script *or* letting your first script write your second script. For the first option, one common way to do it is to use perldoc -f fork to split your process so you can have your original process do the work you're currently doing in your first script, and then have the copied process do the work you'd do in the second script. There are also some packages on CPAN that help you manage multiple jobs that you may want to investigate. I generally use the second option, though, which is to write your second script from your first. Since you already have a script that does the second task, all you really need to do is create a shell script to run the second task with the parameters you've created in the first task. Then once your first script runs, you can execute the new script that it creates, or even add some code to the end of your script to execute the script automatically.
...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|