Changed the following scripts to work on linux