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.
3
Answers
If you want them to run in a terminal window, you will have to start a terminal window.
Or if you do not have a graphic environment on the host (ie you connect to the remote host via ssh) you need a terminal multiplexer like screen or tmux
For both, there are several howto and example all over the web
Maybe this can help you, in the same terminal all processes responses:
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