bin/67041: "fortune -m" peeks in "fortune" file only

Yar Tikhiy yar at comp.chem.msu.su
Sat May 22 06:50:48 PDT 2004


>Number:         67041
>Category:       bin
>Synopsis:       "fortune -m" peeks in "fortune" file only
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 22 06:50:17 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Yar Tikhiy
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Moscow State University
>Environment:
	Fresh CURRENT installation

>Description:
	fortune(6) displays fortunes from the "fortunes" and "fortunes2"
	files by default.  This can be verified with "fortune -f".
	However, searching for a pattern with -m applies to "fortunes" only.

>How-To-Repeat:
	
	$ /usr/games/fortune -m LESSER-KNOWN -f
	___% /usr/share/games/fortune
	    ___% fortunes
	    ___% fortunes2

	That is fortune(6) promises to look into the two files.
	Now let's actually search for the phrase.

	$ /usr/games/fortune -m LESSER-KNOWN | fgrep "%% ("
	%% (fortunes)

	The phrase is found in "fortunes" only.  Now let's add
	the "all" argument to fortune(6).

	$ /usr/games/fortune -m LESSER-KNOWN all | fgrep "%% ("
	%% (fortunes)
	%% (fortunes2)

	I.e., the phrase is present "fortunes2", too, but fortune(6)
	won't find it there by default.

	Conclusion: "fortune -m" won't look into "fortunes2", although
	it promises to.

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list