Try to make .sh file more similar to the behaviour of batch file (hopefully I didn't break anything...)