At present, most of the domestic banking industry computer application systems use terminal business data to enter, business data printing, with end-end business processing on UNIX operating system platforms. The author describes several ways to implement terminal printing under UNIX: 1. Overview The terminal printing under the UNIX environment is supported by the operating system, using the function provided by the terminal, with the command or program to implement the terminal print. The specific process is: performing the print control command on the terminal to enable the terminal into the print state, and notify the printer ready to prepare, enter the file name to print files on the terminal to print. After printing, execute the print control command on the terminal to exit the print state. Second, printing method 1. Print with the hotkey function provided by the terminal itself. Various types of terminals provide the user with the printing hotkey. Just press the printing hotkey terminal to enter the print state, usually use the CAT command to print the file name to print file, print, then press the print hot button You can exit the print state. If the copy print hot button of the HT-382 series terminal is Ctrl-F2.2. Use the shell command to implement the terminal print. The UNIX operating system provides an interactive interpretation command language shell that can easily implement terminal printing. First, find the control command of the terminal print, and also take the HT-382 series terminal as an example, enter the copy print control command is ESC [5i, exiting the copy print control command is ESC [4i. Available VI to edit a shell command print file as follows: Echo 'ESC [5i' # Terminal Enter Print Status Cat $ 1 # Print File
Echo 'ESC [4i' # terminal exits the print state on the terminal or performs this shell print command in the program, and then keeps the file name to print the file. 3. Use the C language to implement the terminal print. Also use the HT-382 series terminal as an example, write the terminal print program with the C language as follows:
#Include