Bug fixed functional commands in scripts

Now accounts for end line characters