This section contains examples using the UNIXProcess class. Evaluate each of the expressions by highlighting them and selecting Display from the Edit menu.One common use for a UNIXProcess is to invoke shell commands from within Smalltalk and capture the output.To invoke a command and not capture the output, the system message is used.In some situations the shell: and system: messages do not provide sufficient control over the process. The following example shows the three stages of a UNIXProcess: creation, the reading and writing of data, and termination.The following code is an example method for an application. The method makes use of the UNIXProcess class to mail a message to a collection of recipients with a given subject. A method similar to this could be used to interface to the UNIX mail facilities from within Smalltalk.Highlighting the following example code and selecting Display will not work. It is a method and requires parameters.
|