How does One Back up a Ubiquiti Switch with NCM?

I have a Ubiquiti switch and tried to construct a script for getting the configuration. The command used was                   cat /tmp/running.cfg

If I am in the switch, this command results in a many settings being displayed.

I tried running this command in a  script with a delay of 20 seconds before the "end" command is given.

The script does not complete and nothing is captured/downloaded.

If I am in the switch, the command results in giving a display of a lot of settings, mcorrectly.

How do I translate that to NCM executing a script?

thanks,

Mark