[net.bugs.4bsd] 4.[123]BSD "refer -p" fails if private filename contains '#'

ado@elsie.UUCP (Arthur David Olson) (09/12/86)

Index:	bin/refer Fix

Description:
	Commands such as
		refer -p #tempfile
	fail.

Repeat-By:
		Script started on Thu Sep 11 17:53:07 1986
		Warning: no access to tty; thus no job control in this shell...
		% tee A #A < /dev/null
		% ( echo ".[" ; echo "oops" ; echo ".]" ) > B
		% refer -p #A B
		Error: Can't read fgrep index #A.ig
		% refer -p A B
		No such paper oops 
		% 
		script done on Thu Sep 11 17:53:47 1986
	...where, of course, both runs of refer should produce the same output.

Fix:
	Change the line near the start of "hunt8.c" that reads:

		sprintf(tmp, "/usr/lib/refer/mkey %s >%s.ig", s,s);
	
	to read

		(void) sprintf(tmp, "/usr/lib/refer/mkey '%s' >'%s.ig'", s,s);
--
Bug/s is a Volkswagen/Warner Brothers trademark.
Hunt is a Hunt/Wesson trademark.
--
	UUCP: ..decvax!seismo!elsie!ado   ARPA: elsie!ado@seismo.ARPA
	DEC, VAX, Elsie & Ado are Digital, Borden & Ampex trademarks.