or download this
the peer script facility, invoked by the x3270 -script switch, and the
+ default mode for s3270 and ws3270. This runs x3270, s3270 or ws3270
+as a child of another process. Typically this would be a script using
+ expect(1), perl(1), or the co-process facility of the Korn Shell ksh
+(1). Inthis mode, the emulator process looks for commands on its stan
+dard input, and places the responses on standard output and standard
+error output.