Combine commands to run on Linux (Debian)
Below we are going to add a bunch of commands into a file and run them all at once where you need to. This should help with development time

Software engineer focusing on PHP, JavaScript, HTML, CSS, CI/CD, GitHub, AWS, Azure & Magento Commerce. I enjoy code for good projects, tech, gym, nature, travel, fried chicken, and coffee.
All my articles are educational only from my experience.
Feel free to connect.
Below we are going to add a bunch of commands into a file and run them all at once where you need to. This should help with development time
In your debian instance
Create a file for your commands
nano /bin/new_scriptAdd some commands to your script with && symbols at end of each command to run after another like example
This is example is Magento 2 Commands when rebuilding code on developer environments
rm -rf generated/code/* && rm -rf pub/static/frontend/* && rm -rf pub/static/adminhtml/* && docker-compose run --rm deploy magento-command setup:upgrade && docker-compose run --rm deploy magento-command setup:di:compile && docker-compose run --rm deploy cloud-deploy && docker-compose run --rm deploy magento-command cache:clean && docker-compose run --rm deploy magento-command cache:flushAdd permissions to file so the script can run anywhere
chmod +x /bin/new_scriptCD into directory you want to run script and run like so
new_script
If this didn't please comment and I will try help you.
Remember to like, post a comment and share this blog if this worked for you.
Happy Coding :)
Asrin
If this helped you consider buying me a coffee :)






