Applescript change folder and terminal commands
General when using the do shell script command, you will need to use the quoted form property of text objects. In other words, do something like this.

set command to "ls"
set result to do shell script quoted form of command
display dialog result