From dds@spiti.spinellis.gr Fri Dec 10 18:31:35 2004 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15A1B16A4CE for ; Fri, 10 Dec 2004 18:31:35 +0000 (GMT) Received: from spiti.spinellis.gr (ppp10-adsl-109.ath.forthnet.gr [62.1.233.109]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7AE543D5F for ; Fri, 10 Dec 2004 18:31:33 +0000 (GMT) (envelope-from dds@spiti.spinellis.gr) Received: from spiti.spinellis.gr (localhost [127.0.0.1]) by spiti.spinellis.gr (8.13.1/8.13.1) with ESMTP id iBAIVUID085680 for ; Fri, 10 Dec 2004 20:31:31 +0200 (EET) (envelope-from dds@spiti.spinellis.gr) Received: (from dds@localhost) by spiti.spinellis.gr (8.13.1/8.13.1/Submit) id iBAIVUh2085679; Fri, 10 Dec 2004 20:31:30 +0200 (EET) (envelope-from dds) Message-Id: <200412101831.iBAIVUh2085679@spiti.spinellis.gr> Date: Fri, 10 Dec 2004 20:31:30 +0200 (EET) From: Diomidis Spinellis Reply-To: Diomidis Spinellis To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: look(1) will silently ignore input from non-disk based files. X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 74926 >Category: bin >Synopsis: look(1) will silently ignore input from non-disk based files. >Confidential: no >Severity: serious >Priority: low >Responsible: dds >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 10 18:40:21 GMT 2004 >Closed-Date: Sun Jan 22 17:24:02 GMT 2006 >Last-Modified: Sun Jan 22 17:24:02 GMT 2006 >Originator: Diomidis Spinellis >Release: FreeBSD 4.10-STABLE i386 >Organization: AUEB >Environment: System: FreeBSD spiti.spinellis.gr 4.10-STABLE FreeBSD 4.10-STABLE #8: Fri Oct 8 18:28:03 EEST 2004 dds@spiti.spinellis.gr:/vol/obj/vol/src/sys/SPITI i386 >Description: Look(1) will not work on non disk based files. The program's design relies on having its input in memory (via mmap). No provisions are made for files that can not be mmaped. >How-To-Repeat: look hyppo Fix: Performing a binary search on sequential input does not make sense. Therefore, either add code to perform a linear scan or map the look(1) invocation into an equivalent sed(1) command: # If -f y/:upper:/:lower:/ # Use the actual characters here # if -d s/[^:alnum:]//g # Always /^word/,${ /^word/!q p } Example: sed -ne 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;/^hyppo/,${;/^hyppo/!q;p;}' Release-Note: >Audit-Trail: State-Changed-From-To: open->analyzed State-Changed-By: dds State-Changed-When: Fri Dec 10 18:44:06 GMT 2004 State-Changed-Why: Taking over as submitter. Responsible-Changed-From-To: freebsd-bugs->dds Responsible-Changed-By: dds Responsible-Changed-When: Fri Dec 10 18:44:06 GMT 2004 Responsible-Changed-Why: Taking over as submitter. http://www.freebsd.org/cgi/query-pr.cgi?pr=74926 State-Changed-From-To: analyzed->closed State-Changed-By: dds State-Changed-When: Sun Jan 22 17:21:38 UTC 2006 State-Changed-Why: User error look(1) with no arguments looks in /usr/share/dict/words, not in its standard input. http://www.freebsd.org/cgi/query-pr.cgi?pr=74926 >Unformatted: