Got end-of-command reply working on scripts