Hlavní navigace



filterm - filter terminal input and/or output




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


See konwert(1). Additionally the following konwert's filters are designed only for filterm:
tyldy (input)
Polish ~a~c~e~l~n~o~s~x~z
lewyap (input)
Polish `a`c`e`l`n`o`s`x`z
boldpl (output)
ASCII with Polish letters shown as bold.
pinectrlchars (output)
Replaces the characters 128..159 shown by the Pine (or another program) as ^