Date: Wed, 29 May 2002 00:39:42 -0700 From: "Philip J. Koenig" <pjklist@ekahuna.com> To: questions@FreeBSD.ORG Subject: grep and console width Message-ID: <20020529073941327.AAA467@empty1.ekahuna.com@pc02.ekahuna.com>
next in thread | raw e-mail | index | archive | help
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 <daemon name string> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020529073941327.AAA467>