From owner-freebsd-questions Sat Jan 2 22:51:34 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA19564 for freebsd-questions-outgoing; Sat, 2 Jan 1999 22:51:34 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from prefetch-atm.san.rr.com (ns1.san.rr.com [204.210.0.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA19559 for ; Sat, 2 Jan 1999 22:51:33 -0800 (PST) (envelope-from Studded@san.rr.com) Received: from san.rr.com (dt087nac.san.rr.com [24.94.19.172]) by prefetch-atm.san.rr.com (8.8.7/8.8.8) with ESMTP id WAA22089; Sat, 2 Jan 1999 22:50:59 -0800 (PST) Message-ID: <368DC1E1.53F0DCF0@san.rr.com> Date: Fri, 01 Jan 1999 22:51:13 -0800 From: Doug Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.5 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: Peihan Wang CC: freebsd-questions@FreeBSD.ORG Subject: Re: grep binary files under xterm References: <368F12D7.5F793D50@mx.cei.gov.cn> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Peihan Wang wrote: > > I am using CTMed 2.2.8 and X11R6 3.3.2. > My window manager is lesstif-0.84. > > Under xterm, for example, When I do the following: > > /etc$ grep abcdefghijklmnop pwd.db > /etc$ > > Because there is no string "abcdefghijklmnop" in > file pwd.db, nothing happens. > > But if I do the following instead: > > /etc$ grep root pwd.db > > Since pwd.db must contains string "root", my xterm > window becomes a mass. ASCII can not be displayed, > all what I can see are strange characters. > > I also tried some binary files while using grep. If > the file contains the searching string, xterm window > becomes a mass. But this will not happen in console > mode. > > How could I tune something to correct it ? Don't grep binary files? I have the following in my .bashrc: alias grep='grep -a' hope this helps, Doug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message