Command line in bash shell script

anyone know how to make the bash shell script to wait for the katalon console mode script to be completed before executing the next command?

e.g. if I have these in the bash script, it will not work, as it will not wait for the katalon command to be completed and it will kill katalon immediately.

katalon --args -noSplash -runMode=console -consoleLog -projectPath=“project.prj” -retry=0 -testSuitePath=“Test Suites/testsuite1” -browserType=“Chrome”

echo kill all processes after katalon test is done
killall -9 katalon
killall -9 chromedriver
pkill -f Chrome
killall -9 java

You have -consoleLog option specified in the command line. But is saying that -consoleLog is a Windows-only option (you should not use it on Mac). I am not too sure if it is siginificant or not.

I suppose your command is finishing immediately. How about checking the exit code from Katalon. Try the following code. If you see any exitCode other than 0, it would imply the command failed.

katalon --args -noSplash -runMode=console -projectPath=“project.prj” -retry=0 -testSuitePath=“Test Suites/testsuite1” -browserType=“Chrome”

echo $exitCode

had the feeling that, if katalon fails, the script stops (goes out of scope)
you can tweak it by using set in the shebang, or even better, use trap to catch the exit procedure and treat it at will

thanks for the suggestions, but they didn’t help. I’d think it’s better not to use bash script in Mac. Maybe using python is better.