From owner-freebsd-bugs@FreeBSD.ORG Sat May 22 06:50:48 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F403716A4CE for ; Sat, 22 May 2004 06:50:47 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCCD743D31 for ; Sat, 22 May 2004 06:50:47 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i4MDoIiW066490 for ; Sat, 22 May 2004 06:50:18 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4MDoI64066489; Sat, 22 May 2004 06:50:18 -0700 (PDT) (envelope-from gnats) Resent-Date: Sat, 22 May 2004 06:50:18 -0700 (PDT) Resent-Message-Id: <200405221350.i4MDoI64066489@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yar Tikhiy Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD5BD16A4CE for ; Sat, 22 May 2004 06:40:32 -0700 (PDT) Received: from stylish.chem.msu.su (stylish.chem.msu.su [158.250.32.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id 105E843D2F for ; Sat, 22 May 2004 06:40:32 -0700 (PDT) (envelope-from yar@stylish.chem.msu.su) Received: from stylish.chem.msu.su (localhost [127.0.0.1]) by stylish.chem.msu.su (8.12.11/8.12.11) with ESMTP id i4MDddl5003556 for ; Sat, 22 May 2004 17:39:39 +0400 (MSD) (envelope-from yar@stylish.chem.msu.su) Received: (from yar@localhost) by stylish.chem.msu.su (8.12.11/8.12.11/Submit) id i4MDdc8i003555; Sat, 22 May 2004 17:39:39 +0400 (MSD) (envelope-from yar) Message-Id: <200405221339.i4MDdc8i003555@stylish.chem.msu.su> Date: Sat, 22 May 2004 17:39:39 +0400 (MSD) From: Yar Tikhiy To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/67041: "fortune -m" peeks in "fortune" file only X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 13:50:48 -0000 >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: