edrc/lib/fit [ -h | -m ] [ width ]
This command can be used together with tty_columns(3) to fit a stream to the current width of a terminal (tty).
[ / ]
[ root@acme007 ][-sh]: cat /etc/services |\
                         fit2width -m `tty_columns`
#
# /etc/services: - Network services, Internet Style
#
# Each line describes one service, and is of the for >>
#
# service-name  port/protocol  [aliases ...]   [# co >>
tcpmux          1/tcp                           # TC >>
tcpmux          1/udp                           # TC >>
rje             5/tcp                           # Re >>
:
:
[ / ]
[ root@acme007 ][-sh]: cat /etc/services |\
                         fit2width -m
#
# /etc/services: - Network services, Internet Style
#
# Each line describes one service, and is of the for >>
#
# service-name  port/protocol  [aliases ...]   [# co >>
tcpmux          1/tcp                           # TC >>
tcpmux          1/udp                           # TC >>
rje             5/tcp                           # Re >>
:
:
[ / ]
[ root@acme007 ][-sh]: cat /etc/services |\
                         fit2width -m 55
#
# /etc/services: - Network services, Internet Style
#
# Each line describes one service, and is of the for >>
#
# service-name  port/protocol  [aliases ...]   [# co >>
tcpmux          1/tcp                           # TC >>
tcpmux          1/udp                           # TC >>
rje             5/tcp                           # Re >>
:
:
This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.