http://qs321.pair.com?node_id=106364


in reply to Parsing (l)unix man pages

perl -e 'open(FILE, "/usr/bin/man ssh | "); while(<FILE>) { print if / +SYNOPSIS/ }'
Works great, on Solaris. Maybe the fancy formatting (bold fonts etc) of the man page on your system is what is getting you hung up? Having weird terminal control characters in the output from man to do font decorations might be making your match fail.