filterm - filter terminal input and/or output
filterm INPUT OUTPUT [COMMAND [ARGS]]
Execute the specified COMMAND (default is the shell), filtering terminal input and/or output.
It can help e.g. when our terminal is unable to display non-ASCII characters or to enter them from the keyboard. It also makes writing various terminal filters easier.
INPUT and OUTPUT are names of konwert's filters - they are passed as the first argument to the konwert(1) program. filterm - OUTPUT filters only output, and filterm INPUT - only input.
The command - executes the shell as a login shell.
It differs from konwert INPUT | COMMAND | konwert OUTPUT in that the command is executed on a pseudo-terminal, so full-screen programs work correctly.
The filters have to output the characters as soon as they receive all necessary input, without buffering. trs(1) scripts are OK, but sed(1) or awk(1) or tr(1) scripts are not. In C you may use R read() , R getchar() , R fread() , and R write() , but putchar() and fwrite() only together with R fflush(stdout) . In C++: R cin.get() , R cout.put() , and R cout << . In perl: R sysread , R getc , R read , and R syswrite , but print only with R $| = 1 .
The input filter will have set the environment variable R FILTERM=in , and the output one - R FILTERM=out . This way some filters can slightly alter their behaviour when working for filterm.
display help and exit
output version information and exit
FILTERS FOR FILTERM
See konwert(1). Additionally the following konwert's filters are designed only for filterm:
ASCII with Polish letters shown as bold.
Replaces the characters 128..159 shown by the Pine (or another program) as ^