Redirecting Input and Output

In most Unix environments, it is possible to redirect all screen output from LINGO to a text file. You can also redirect all input from the keyboard to an input file. This is accomplished by specifying the files in the command-line using the following syntax:

LINGO < input_file > output_file

Upon execution of this command, LINGO will take its input from input_file and a text file will be created called output_file , which contains everything that would have appeared on the screen had LINGO been started normally. Path names may be included in the names of the input and output files.

Exploiting this capability allows you to use LINGO as a "black box" in larger turnkey applications. If done properly, the user will not be aware LINGO is running in the background.

As an example, we could run the script file from the previous section, TEST.LTF, generating the same solution file, SOLU.TXT, with the command:

LINGO < TEST.LTF > CAPTURE.TXT

The file CAPTURE.TXT is used to capture all screen output.