32 lines
633 B
Diff
32 lines
633 B
Diff
--- bsd-games-2.17/countmail/countmail.orig
|
|
+++ bsd-games-2.17/countmail/countmail
|
|
@@ -39,27 +39,7 @@
|
|
|
|
# Count the messages in your mailbox, using only POSIX shell builtins.
|
|
#
|
|
-# 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`
|
|
-v=$1
|
|
-#v=`from | wc -l`
|
|
-
|
|
-#v=0
|
|
-#exec 0</var/mail/$USER
|
|
-#while read line; do
|
|
-# case "$line" in
|
|
-# "From "*) v=$(($v + 1)) ;;
|
|
-# esac
|
|
-#done
|
|
-#exec 0<&-
|
|
+v=$(grep -c "^From " /var/mail/$USER)
|
|
|
|
set --
|
|
g=0
|