File:  [Research Unix] / researchv10dc / man / man0 / makind1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

cd $1
for i in *
do
	sed -n "
	/^.TH *[^ ]* */{
		s///
		s/ .*//
		h
	}
	/^.SH[ 	]*NAME *$/{
		N
		s/.*\n//
		:x
		N
		/\\n.SH.*/{
			s///
			s/^/$i /
			s/\.[^ .]* / /
			s/\\n/ /g
			s/  */ /g
			G
			s/\([^ ]*\)\(.*\)\n\(.*\)/\1(\3)\2/
			s/[A-Z])/)/
			p
			d
		}
		s/\n\..*//
		bx
	}
" $i
done 
exit
# add to shell script to get file references
# in this case, pipe output thru uniq
	/^\.RF *[^ ]*/s//.F/
	/^\.FR\(.* \).*/s//.F \1/
	/^\.F  */{
		s//$i /
		s/\.[^ .]*//
		G
		s/\([^ ]*\)\(.*\)\n\(.*\)/\1(\3)\2/
		s/[A-Z+])/)/
		p
	}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.