Issue
I have create a simple bash script for my laravel project (file name: bash-script.sh)
php artisan serv
php artisan queue:work --queue=first_queue
php artisan queue:work --queue=second_queue
php artisan queue:work --queue=third_queue
php artisan queue:work --queue=fourth_queue
php artisan schedule:work
the problem is I want each line of these commands to run in separate terminals.
Solution
Maybe this can help you, in the same terminal all processes responses:
php artisan serv &
php artisan queue:work --queue=first_queue &
php artisan queue:work --queue=second_queue &
php artisan queue:work --queue=third_queue &
php artisan queue:work --queue=fourth_queue &
php artisan schedule:work
The ampersand (&) it's for executing in another process and freeing the current execution, all outputs in every processes will write on the same terminal
Answered By - Mauricio Florez Answer Checked By - Willingham (WPSolving Volunteer)