in reply to Automating execution of shell scripts
As I understand your problem, you have two shell scripts which you must use "as is". You want a perl program to automate this procedure. For each argument, run script1 which computes a directory name and creates that directory, then run script2 in that directory. Your question is how can your perl program get the name of directory it needs to run script2.
You tell us that script1 " prints in the terminal the path to the created dir." You should be able to capture that output if you run script1 with backticks. my $script_output = `script1`'. You can change the working directory with the function chdir. You may need the module Cwd to get the directory you want to return to.
Bill
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Automating execution of shell scripts
by wisely (Initiate) on Sep 02, 2021 at 11:30 UTC | |
Re^2: Automating execution of shell scripts
by wisely (Initiate) on Sep 03, 2021 at 11:52 UTC | |
by choroba (Cardinal) on Sep 03, 2021 at 13:01 UTC | |
by hippo (Bishop) on Sep 03, 2021 at 13:07 UTC | |
by BillKSmith (Monsignor) on Sep 04, 2021 at 01:42 UTC | |
by wisely (Initiate) on Sep 20, 2021 at 07:51 UTC | |
by AnomalousMonk (Archbishop) on Sep 20, 2021 at 18:33 UTC | |
by wisely (Initiate) on Sep 23, 2021 at 08:57 UTC | |
by BillKSmith (Monsignor) on Sep 20, 2021 at 16:09 UTC |
In Section
Seekers of Perl Wisdom