1#!/bin/sh
2# test which words in all caps end a NAME section in a (compressed) cat page
3#
4# Found so far:
5#
6# SYNOPSIS
7# SYNOPOSIS
8# SYSTEM V SYNOPSIS
9# SYNTAX
10# DESCRIPTION
11# COMMAND
12# OVERVIEW
13# STRUCTURES
14# INTRODUCTION
15#
16	for i in *
17	do
18		zcat $i | col -bx | sed '1,/^NAME/d; /^[A-Z][A-Z]/q' | tail -1
19	done
20