#!/usr/bin/perl # ptp.pl # this script will turn on pass-through printing, print data received # on STDIN, and then turn off pass-through printing. # These are the escape sequences used by the various terminal emulations # that CRT & SecureCRT support. Uncomment $pcon_on and $pcon_off specific # to your emulation. # For VT100, VT102, VT220, ANSI, Linux, SCOANSI, XTERM # printer controller escape sequences (sends information to the printer # only) $pc_on = "\033[5i"; # [5i $pc_off = "\033[4i"; # [4i # auto print escape sequences (sends information to the printer and to # the screen # $pc_on = "\033[?5i"; # [?5i # $pc_off = "\033[?4i"; # [?4i # For Wyse50 # transparent print mode escape sequences (sends information to the # printer only) # $pc_on = "\030"; # X # $pc_off = "\024"; # T # auxiliary print mode escape sequences (sends information to the # printer and to the screen) # $pc_on = "\022"; # R # $pc_off = "\024"; # T # For Wyse60 # transparent print mode escape sequences (sends information to the # printer only) # $pc_on = "\033d#"; # d# # $pc_off = "\024"; # T # auxiliary print mode escape sequences (sends information to the # printer and to the screen) # $pc_on = "\022"; # R # $pc_off = "\024"; # T # get the data to send to the printer from STDIN @input = <>; $lines = @input; # print the data print "pass-through printing on\n"; print $pc_on; print @input; print $pc_off; print "pass-through printing off\n"; print $lines, " lines printed\n";