summaryrefslogtreecommitdiffstats
path: root/src/mwi
diff options
context:
space:
mode:
Diffstat (limited to 'src/mwi')
-rwxr-xr-xsrc/mwi19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mwi b/src/mwi
new file mode 100755
index 0000000..3b52feb
--- /dev/null
+++ b/src/mwi
@@ -0,0 +1,19 @@
+#!/bin/sh
+# test which words in all caps end a NAME section in a (compressed) cat page
+#
+# Found so far:
+#
+# SYNOPSIS
+# SYNOPOSIS
+# SYSTEM V SYNOPSIS
+# SYNTAX
+# DESCRIPTION
+# COMMAND
+# OVERVIEW
+# STRUCTURES
+# INTRODUCTION
+#
+ for i in *
+ do
+ zcat $i | col -bx | sed '1,/^NAME/d; /^[A-Z][A-Z]/q' | tail -1
+ done