File: say

package info (click to toggle)
orville-write 2.55-2.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 556 kB
  • ctags: 317
  • sloc: ansic: 3,494; sh: 2,927; makefile: 155
file content (33 lines) | stat: -rwxr-xr-x 1,010 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# "SAY" SCRIPT - A cheap simulution of the Well/River "say" command using
#      Jan Wolter's "gate" and "write" programs.
#
# SYNOPSIS:
#    say [user|-|.] [tty]
#
# DESCRIPTION:
#    Say will prompt you to enter some text, and then send it in one burst
#    to the named user.  It is essentially similar to "tel" except that
#    "tel" is limited to a single line of text.
#
#    As with tel, the recipient must have message and telegram permissions
#    enabled.  If he has the "mesg -r" flag set, he will be able to redisplay
#    the message with the "huh" command.
#
#    Say will not work if system administrators have set the -f flag to be
#    the default on "write."
#
#    The two lines below should be set to the paths of the "gate" and "write"
#    commands.  "Red" could be used instead of "gate."
#
gate=/wolter/src/mnet/gate/gate
write=/wolter/src/mnet/write/write
rm=/bin/rm
#
file=/tmp/say$$
$gate --prompt="" --outdent=0 $file
if ($write $* < $file)
then
	echo DONE
fi
rm -f $file