From owner-freebsd-questions Tue Jan 25 6:59:19 2000 Delivered-To: freebsd-questions@freebsd.org Received: from houston.matchlogic.com (houston.matchlogic.com [205.216.147.127]) by hub.freebsd.org (Postfix) with ESMTP id 8352814D1F for ; Tue, 25 Jan 2000 06:59:17 -0800 (PST) (envelope-from crandall@matchlogic.com) Received: by houston.matchlogic.com with Internet Mail Service (5.5.2650.21) id ; Tue, 25 Jan 2000 07:59:15 -0700 Message-ID: <64003B21ECCAD11185C500805F31EC0304D97813@houston.matchlogic.com> From: Charles Randall To: Neil Blakey-Milner , Dan Larsson Cc: "[FreeBSD-Questions-List] (E-postl)" Subject: RE: How many rows in sh Date: Tue, 25 Jan 2000 07:59:11 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Or use grep's "-c" option. E.g., % grep -c ipopd /var/log/maillog -Charles -----Original Message----- From: Neil Blakey-Milner [mailto:nbm@mithrandr.moria.org] Sent: Tuesday, January 25, 2000 3:18 AM To: Dan Larsson Cc: [FreeBSD-Questions-List] (E-postl) Subject: Re: How many rows in sh On Tue 2000-01-25 (11:18), Dan Larsson wrote: > I use a script to filter out the number of login/logouts on pop/imap/uucp. > Is there some way of *counting* the number of lines a certain filter produces > ( 'grep ipopd /var/log/maillog' for pop3) in sh? > FYI I've RTFM sh man page Add a "| wc -l" and you're in business. Check out wc(1). Neil -- Neil Blakey-Milner nbm@rucus.ru.ac.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message