#!/usr/bin/perl
#
#NAME
#  stripman - remove control chars from Unix manual pages
#
#SYNOPSIS
#  stripman [file]..
#
#DESCRIPTION
#  This reads the files or stdin, and writes the text to stdout,
#  with all the funny control chars stipped out.  The result will
#  not have anything underlined or overstruck (bold). It will be
#  a plain text file, suitable for use by other software.
#
#BUGS
#  The man pages often use underlined text for metasymbols; this
#  information is lost when we strip out the markup.
#
#AUTHOR John Chambers <jc@trillian.mit.edu>
#
#  There might be some Unix systems around whose man command gives
#  control chars other than the ones we look for here. If you find
#  any such, please let me know, and maybe we can fix it.

for $line (<>) {
	$line =~ s/.//g;
	$line =~ s///g;
	print $line;
}
