I have 50 php files that I would like to run simultaneously from the command line. Right now, I am running them in multiple CLI windows using the code:
php Script1.php
I would like to be able to call one single script file that would execute all 50 php files simultaneously. I have been reading about how to make the command line not wait for the output, but I can’t seem to make it work.
I am new to both MAC and Scripting – maybe I don’t need a script? Is there another mac based solultion that can do this without me having to open 50 separate terminal windows?
You can just add ampersand ‘
&‘ to separate each command:This ampersand symbol will tell the shell to run command on background.
To check the output, you can redirect it to a file:
And you can just do a
tailon it to read the log: