4.[123]BSD "refer -p" fails if private filename contains '#' (with fix)

Arthur David Olson ado at elsie.UUCP
Fri Sep 12 07:58:46 AEST 1986


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 at seismo.ARPA
	DEC, VAX, Elsie & Ado are Digital, Borden & Ampex trademarks.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list