I need to execute parallel flows in my script.How do i obtain the following :
Start a process on linux.Without waiting for the process to complete, the script flow should go to the next step to determine the process id of the process initiated in the previous step.
I tried to run the process in the background . But that does not help my cause.Sample test script is mentioned below . This script still gives me sequential execution flow.
#!/usr/software/bin/perl my $sio_cmd = `./sio_linux random 100 1k 0 512k 20 1 testfile &`; print "The command output = $sio_cmd"; $proc_cmd = `ps -ef | grep -i sio`; print "\nThe process output is : $proc_cmd\n"; if($proc_cmd =~ /\w+?\s+?(\d+)\s+?.*$sio_cmd.*/){ print "\nThe process id is : $1 \n"; }else{ print "\nNo process id\n"; }
After the execution of $sio_cmd ,the script should proceed to execute $proc_cmd without waiting for the process initiated by the execution of $sio_cmd to complete.
Thanks in advance.
In reply to Parallel Execution Flows by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |