kbdpipe(1) 06 Dec 1994 kbdpipe(1)
NAME
kbdpipe - use the KBD module in a pipeline
SYNOPSIS
kbdpipe -t table [-f tablefile] [-F] [-o outfile] [infile(s)]
DESCRIPTION
kbdpipe allows the use of KBD tables as pipeline elements between user
programs [see kbdcomp(1M) and kbd(7) for general descriptions of the
KBD module and its capabilities]. The kbdpipe command is mostly useful
in codeset conversion applications. If an output file is given, then
all infiles are piped to the given output file. With no arguments
other than -t, standard input is converted and sent to standard out-
put.
The required option argument -t identifies the table to be used for
conversion. If the table has already been loaded as a shared table it
is attached. If, however, the table has not been loaded, an attempt is
made to load it. If the given table name is not an absolute pathname
then the name of the system mapping library is pre-pended to the argu-
ment, and an attempt is made to load the table from the resulting
pathname (that is, it becomes an argument to the loader, kbdload).
Assuming the table can be loaded, it is attached.
The argument to -f defines the filename from which the table will be
loaded, overriding the default action described above. The file is
loaded (in its entirety), and the named table attached. This option
should be used if the default action would fail.
The output file specified by -o must not already exist (a safety
feature.) The option -F may be used to override the check for
existence of the output file; in this case, any existing outfile will
be truncated before being written.
EXAMPLES
The following example converts two input files into relative nonsense
by mapping ASCII into Dvorak keyboard equivalents using the Dvorak
table. The table is assumed to reside in the file /usr/lib/kbd/Dvorak.
The existing output file is forcefully overwritten:
kbdpipe -F -t Dvorak -o iapxai.vj file1 file2
The following example loads the Dvorak table from a different file,
then converts standard input to standard output. The Dvorak table
(assumed to be non-resident) is explicitly loaded from an absolute
path beginning at the user's home directory:
kbdpipe -t Dvorak -f $HOME/tables/Dvorak.tab
LIMITATIONS
Because kbdpipe uses the kbdload command to load tables, it cannot
resolve link references. Therefore, if a composite table is to be
used, the relevant portions must either be already loaded and public,
or be contained in the file indicated (via the -f option) on the
Page 1 Reliant UNIX 5.44 12, 196
kbdpipe(1) 06 Dec 1994 kbdpipe(1)
command line; in this case, the composite elements must be loaded ear-
lier than the link entry.
CAVEATS
Users may now use KBD tables in programs at user level, by just open-
ing a pipe, pushing the module, and setting via related commands;
there is thus no need to use kbdpipe. This command may not be sup-
ported in future releases of the system.
FILES
/usr/lib/kbd directory containing system standard table files
SEE ALSO
kbdset(1), kbdload(1M), kbd(7).
Page 2 Reliant UNIX 5.44 12, 196