about summary refs log tree commit diff stats
path: root/scripts/man2hlp.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/man2hlp.sh')
-rwxr-xr-xscripts/man2hlp.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/man2hlp.sh b/scripts/man2hlp.sh
index fed9b428..cc1653cb 100755
--- a/scripts/man2hlp.sh
+++ b/scripts/man2hlp.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $LynxId: man2hlp.sh,v 1.3 2008/09/10 13:25:45 tom Exp $
+# $LynxId: man2hlp.sh,v 1.4 2021/01/07 00:34:48 tom Exp $
 # This script uses rman (Rosetta Man), which complements TkMan, to strip
 # nroff headers from a manpage file, and format the result into a VMS help
 # file.
@@ -9,13 +9,13 @@ LC_ALL=C;	export LC_ALL
 LC_CTYPE=C;	export LC_CTYPE
 LANGUAGE=C;	export LANGUAGE
 
-for name in $*
+for name in "$@"
 do
-	NAME=`echo $name |sed -e 's/\.man$/.1/'`
-	(echo 1 `echo $NAME | sed -e 's/^.*\///' -e 's/\..*$//' | tr '[a-z]' '[A-Z]'` ; \
-	(echo '.hy 0'; cat $name) |\
+	NAME=`echo "$name" |sed -e 's/\.man$/.1/'`
+	(echo 1 "`echo \"$NAME\" | sed -e 's/^.*\///' -e 's/\..*$//' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`" ; \
+	(echo '.hy 0'; cat "$name") |\
 	nroff -Tascii -man |\
-	rman -n$NAME |\
+	rman -n"$NAME" |\
 	sed	-e 's/^[1-9].*$//' \
 		-e 's/^\([A-Z]\)/2 \1/' |\
 	uniq)