named pipes and .plan

Paul John Falstad pfalstad at phoenix.Princeton.EDU
Fri Sep 28 08:13:36 AEST 1990


In article <5932 at ge-dab.GE.COM> coleman at sunny.DAB.GE.COM (Richard Coleman) writes:
>Could someone send me or post a simple example
>of sending program output to .plan when someone uses
>the finger command.  It would be greatly appreciated.

Somebody just posted an 100+ line program that does much the same thing as
this (unless I'm missing something really obvious):

nowhere% cd
nowhere% /usr/etc/mknod .plan p
nowhere% sh
$ while true; do (
> echo This is my .plan.
> /usr/games/fortune         # put whatever you want inside the ( )'s
> ) >.plan; sleep 1; done &
12345
$ exit
nowhere% cat .plan
This is my .plan.
Stupid, n.:
	Losing $25 on the game and $25 on the instant replay.

Also try this inside the plan:

echo Stop fingering me, `w|grep finger|awk '{print $1}'`

Now what am I missing??? Why does this have to be so complicated????

Paul Falstad, pfalstad at phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD
I'd like to answer this question, if I may, in two ways.  Firstly in
my normal voice, and then in a kind of silly high-pitched whine.



More information about the Comp.unix.programmer mailing list