in reply to how do i execute dependant system commands in perl (i m trying waitpid but does not work) - please help

In what way doesn't it work? system already waits for the executed command to complete so you shouldn't need anything more than:

system("zcat....> file1 &"); system("java file1 &");

to have the commands run one after the other.

True laziness is hard work
  • Comment on Re: how do i execute dependant system commands in perl (i m trying waitpid but does not work) - please help
  • Download Code

Replies are listed 'Best First'.
Re^2: how do i execute dependant system commands in perl (i m trying waitpid but does not work) - please help
by BrowserUk (Patriarch) on Jan 27, 2012 at 10:26 UTC
    system already waits for the executed command to complete

    Don't the ampersands on the ends of those commands mean that the command processes will be backgrounded by the shell and system will return immediately?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      Argh! Quite right - I didn't notice them. :(

      In fact that will be why it "doesn't work" for the OP. Probably a little cargo culting going on.

      True laziness is hard work