I have a .sh file in which I want to run in Scala once a Gatling scenario has finished.
Does anyone have any code that would execute my sh script.
You should use the after block provided by Gattling :-
Refer this : https://docs.gatling.io/reference/script/core/simulation/#hooks
Here you can use after block :-
after { println("Simulation is finished!")}
Rest all is pure scala so use @Andrey answer above