In the latest version of NCM, they changed the way that scripts are transmitted to devices. In the past, if you wanted your script to send a blank line, you could simply put one in to your script. For some reason they decided to change that behavior and remove what they consider to be "extra" returns and collapse them into a single one. I'm proposing we go back and transmit scripts verbosely!!
As a result, lets say you want to do something like "copy run start", which everyone that works with Cisco knows will copy the running config to the startup config. When doing this, the Cisco box will prompt you to confirm the filename with "Destination filename [startup-config]?". Previously you could just hit enter and the script would be transmitted as-is, something like this:
!Begin script
copy run start
show version
!End Script
However, now you have to be much more verbose. If you were to attempt to try the script above, the blank line in the middle would be removed and it would enter the "show version" in the confirm filename prompt causing problems. Lets say you just had the first two lines, the "copy" and the return, the way it works now your script would end there, the filename confirmation would never be completed and it would log out not completing your desired action.
To get around this, your now having to do things to get around it, like putting in the full filename confirmation in your script, something like this:
!Begin script
copy run start
startup-config
dir
!End Script
Not the line with "startup-config", that is just to doubly confirm the filename. The "dir" at the end I've found to be best practice right now, its simply a dummy command to be a placeholder for the return that is needed after the filename confirmation.