Use sprintf() to format command string