FILTERM(1) | Linux User's Manual | FILTERM(1) |
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 read(), getchar(), fread(), and write(), but putchar() and fwrite() only together with fflush(stdout). In C++: cin.get(), cout.put(), and cout <<. In perl: sysread, getc, read, and syswrite, but print only with $| = 1.
The input filter will have set the environment variable FILTERM=in, and the output one - FILTERM=out. This way some filters can slightly alter their behaviour when working for filterm.
See konwert(1). Additionally the following konwert's filters are designed only for filterm:
512bold filter is not perfect. Some escape sequences may be emulated incorrectly. Additionally, colors changed in multiple steps or not used unnecessarily allocate some of the eight colors.
filterm filters terminal input and/or output. It forms part of the konwert package.
Copyright (c) 1998 Marcin 'Qrczak' Kowalczyk
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
__("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.home.ml.org/
\__/ GCS/M d- s+:-- a21 C+++>+++$ UL++>++++$ P+++ L++>++++$ E->++
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP->+ t QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-
30 Jul 1998 | Konwert |