7 if [ X
"$1" = X-v
] ; then
12 echo "usage: $0 [-v] which-shell ksh.Man-file" 1>&2
22 echo "$0: bad shell option (must be sh or ksh)" 1>&2
26 if [ ! -r "$man" ] ; then
27 echo "$0: can't read $man file" 1>&2
33 # Now generate the appropriate man page...
35 [ $verbose = yes ] && echo "$0: Generating $which man page (0=sh,1=ksh)..." 1>&2
37 ${AWK} 'BEGIN { ksh = '$which'; pr = 1 }
38 /^\.sh\(/ { pr = ksh - 1; next }
39 /^\.sh\)/ { pr = 1; next }
40 /^\.ksh\(/ { pr = ksh; next }
41 /^\.ksh\)/ { pr = 1; next }
42 { if (pr) print $0 } ' < $man
44 [ $verbose = yes ] && echo "$0: All done" 1>&2