From: "Dr. Tobias Quathamer" Date: Sat, 29 Jul 2023 21:56:13 +0200 Subject: Sync countmail with NetBSD-HEAD --- countmail/countmail | 34 ++++------------------------------ countmail/countmail.6 | 15 ++++++++------- 2 files changed, 12 insertions(+), 37 deletions(-) diff --git a/countmail/countmail b/countmail/countmail index e574d6c..17537be 100644 --- a/countmail/countmail +++ b/countmail/countmail @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: countmail,v 1.5 2002/07/02 17:18:21 mycroft Exp $ +# $NetBSD: countmail,v 1.8 2021/05/02 13:10:36 rillig Exp $ # # Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -16,13 +16,6 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by the NetBSD -# Foundation, Inc. and its contributors. -# 4. Neither the name of The NetBSD Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -37,29 +30,10 @@ # POSSIBILITY OF SUCH DAMAGE. # -# Count the messages in your mailbox, using only POSIX shell builtins. +# Count the messages in your mailbox. # -# Caveats: -# -# The read loop is horrendously slow on every implementation I've -# tried. I suggest using from(1) and wc(1) instead, though these are -# not shell builtins. - -# for krb. -#set -- `from -t` -#v=$3 -set -- `from | wc -l` +set -- `from 2>/dev/null | wc -l` v=$1 -#v=`from | wc -l` - -#v=0 -#exec 0