OS::Execute
- OS::Execute(command): int
-
Executes command in the operating system shell and waits for it to finish. Command output is not captured.
This function is available only in scripts run by the nxscript command line tool.
Table 1. Parameters command
String
Command line to execute
ReturnExit code of the command, or
127if the command could not be started.rc = OS::Execute("tar czf /tmp/backup.tgz /etc/netxms"); if (rc != 0) println("Backup failed with exit code " .. rc);