> Tutorials > Interactive Optimizer Tutorial > Executing Operating System Commands |
Executing Operating System Commands |
INDEX
![]() |
The execute command (xecute
) is simple but useful. It executes operating system commands outside of the ILOG CPLEX environment. By using xecute
, you avoid having to save a problem and quit ILOG CPLEX in order to carry out a system function (such as viewing a directory, for example).
As an example, if you wanted to check whether all of the files saved in the last session are really in the current working directory, the following ILOG CPLEX command shows the contents of the current directory in a UNIX operating system, using the UNIX command ls
:
After the command is executed, the CPLEX>
prompt returns, indicating that you are still in ILOG CPLEX. Most commands that can normally be entered from the prompt for your operating system can also be entered with the xecute
command. The command may be as simple as listing the contents of a directory or printing the contents of a file, or as complex as starting a text editor to modify a file. Anything that can be entered on one line after the operating system prompt can also be executed from within ILOG CPLEX. However, this command differs from other ILOG CPLEX commands in that it must be entered on a single line. No prompt will be issued. In addition, the operating system may fail to carry out the command if insufficient memory is available. In that case, no message is issued by the operating system, and the result is a return to the CPLEX>
prompt.
The general syntax for the xecute
command is:
Copyright © 1987-2003 ILOG, S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |