changed printf to use %s and changed newlines in the command string to semi colons