parallel processing via system() command and logging output

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Trying to do parallel clearcase operations over many VOBs in
parallel...code snippet:

foreach $vob (@VLIST) {

                system("cleartool find -all -version 'lbtype($OLDIB)
&& !lbtype($NEWIB)' -exec \"cleartool mklabel -replace $NEWIB \
\"%CLEARCASE_XPN%\\"\" &");

This seems to work just fine as is, but I would prefer to log the
output rather than seeing stdout.  The current implementation allows
all the spawned processes to return stdout to screen in a mumbled
order.  I would simply like the individual processes to get logged to
unique logfiles....perhaps /tmp/$vob.txt.




Re: parallel processing via system() command and logging output

Quoted text here. Click to load it

Yep. reading the manual for the functions you are using would help. See
'perldoc -f system',  third paragraph, fourth sentence:

            This is
            *not* what you want to use to capture the output from a
            for that you should use merely backticks or "qx//", as
            in the section on "`STRING`" in the perlop manpage.

Or just redirect the output into a file using the means provided by your
command shell.


Site Timeline