[comp.unix.questions] Can I adjust the output from "biff"?

jfw@cello.mc.duke.edu (John Whitehead) (09/28/90)

Is there a way that I can make it so my "biff" announcements are briefer?

That is to say, when I get mail it interrupts me and says:

	New mail for jfw@neuro has arrived:
	----
	Date: Fri, 28 Sep 90 11:21:08 EDT
	From: jfw@neuro.duke.edu (John F. Whitehead)
	To: jfw
	
	Fri Sep 28 11:21:07 EDT 1990

	----

Can I make it so all it says is "New mail for jfw@neuro has arrived"?

I am running SunOS 4.1, which I guess is a Berkeley variation.  Thanks.

    John Whitehead	               Internet:  jfw@neuro.duke.edu
    Department of Neurobiology                    jfw@well.sf.ca.us
    Duke University Medical Center     Bitnet:    white002@dukemc           
    Durham, North Carolina             

pfalstad@dae.Princeton.EDU (Paul John Falstad) (09/29/90)

In article <21623@duke.cs.duke.edu> jfw@neuro.duke.edu (John Whitehead) writes:
>Is there a way that I can make it so my "biff" announcements are briefer?

>I am running SunOS 4.1, which I guess is a Berkeley variation.  Thanks.

Interesting.  We have SunOS 4.1, but biff doesn't work.

Well, if you're really desperate, you could just create your own biffer,
like I had to do, since biff doesn't work on our system.  Here it is:

---cut here---
#! /bin/sh
(cat; echo EOF) | (echo '
----
New mail has arrived:
'; sed 20q; echo ---- ) >/dev/`(who;
echo \`whoami\` null) | grep \`whoami\` | sed 1q | awk '{ print $2 }'`
exit 0
---cut here---

Put this in your private bin directory (say in /u/foobar/bin/biffer)
and create a .forward file like this:

\foobar, | /u/foobar/bin/biffer

And use biff n in your .login.  Now you can change biffer to do whatever
you want with the message.  If you just want to know that new mail has
arrived without seeing it, you could just do:

#! /bin/sh
echo 'You have new mail.' >/dev/`(who;
echo \`whoami\` null) | grep \`whoami\` | sed 1q | awk '{ print $2 }'`
exit 0

Or else you could filter out the header of the mail message.

There is probably an easier way, since you have comsat working, but this
works for me.

Here is the address to complain to:
pfalstad@phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD CIS: 70016,1355
That address again,
sync@thumper.princeton.edu PLink:OHS738 GEnie:OHS738 CIS: 4128 143 1234 937