Correct sh script so that semicolons are removed