I want to make shell script file in windows and linux with multiple commands inside it.
E.g run.sh and run.bat with the below commands
run.bat or run.sh
mvn clean
mvn install
mvn exec:java
When I run my run.bat file it only executes first command mvn clean but it do not execute other commands.
How to make shell-script file with multiple commands so that when I execute it, It executes all commands inside it.
Thanks.
mvncommand line\rlinefeeds would makecmdunderstand the whole.batas a single line, so I would check for that.psscripts as an alternative to.batscripts ; their syntax is much closer to.shfiles (although they still are two vastly different environnements). I feel like they're still not used a lot in the industry, but if you need some kind of guarantee RedHat started including.psscripts in their JBoss EAP 7.0 release (although they still include equivalent.bat)powershellinstead ofcmd, I think the problem wouldn't have happened then :)