From owner-freebsd-questions Wed May 29 0:39:45 2002 Delivered-To: freebsd-questions@freebsd.org Received: from empty1.ekahuna.com (empty1.ekahuna.com [198.144.200.196]) by hub.freebsd.org (Postfix) with ESMTP id CBD3A37B404 for ; Wed, 29 May 2002 00:39:41 -0700 (PDT) Received: from pc-02 (pc02.ekahuna.com [198.144.200.197]) by empty1.ekahuna.com (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35) with ESMTP id com for ; Wed, 29 May 2002 00:39:41 -0700 From: "Philip J. Koenig" Organization: The Electric Kahuna Organization To: questions@FreeBSD.ORG Date: Wed, 29 May 2002 00:39:42 -0700 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: grep and console width Reply-To: pjklist@ekahuna.com X-mailer: Pegasus Mail for Win32 (v3.12c) Message-ID: <20020529073941327.AAA467@empty1.ekahuna.com@pc02.ekahuna.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I was shocked to discover today that the "grep" command is impacted by the width of a console window. I found this out because there's a daemon I've been working with whose "ps" output exceeds 80 chars. But it's a perl script so the string /usr/bin/perl preceeds it on the command-line. There are 2 active processes which use perl. When I use: ps -aux |grep perl It shows both perl processes, including the one mentioned above. (the ps output is just truncated at the right margin, prior to the string which identifies the daemon mentioned above) But when I use: ps -aux |grep It doesn't return anything! But if I change the console size from 80 columns to 132 columns, poof, grep now returns the match! So does the size of the display really change whether grep knows about the output of a command?!? -- Philip J. Koenig pjklist@ekahuna.com Electric Kahuna Systems -- Computers & Communications for the New Millenium To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message