File: acedb_mailer

package info (click to toggle)
acedb 4.9.39+dfsg.02-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 33,796 kB
  • sloc: ansic: 256,989; perl: 2,803; cpp: 2,534; csh: 1,712; python: 862; sh: 658; makefile: 298; awk: 249; lex: 225; yacc: 221
file content (52 lines) | stat: -rw-r--r-- 1,376 bytes parent folder | download | duplicates (3)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#! /bin/csh
##########################################################################
#################      A C.elegans database    ###########################
#################   R.Durbin and J.Thierry-Mieg  #########################
#################                                #########################
#################   Mailer script,  Octobre 92   #########################
##########################################################################
# $Id: acedb_mailer,v 1.3 1997/04/28 12:31:43 rd Exp $
# This script is invoked when using mail in the menu
# of a keySet or of an Tree display, or a longText.

# The idea is simply to extract the mail address from within 
# acedb of one or a keySet of people
# Thus acedb acts as a general .aliases system

# The script expects 2 parameters,
# $1 is a list of email addresses, $2 a temp file name

# A harmless header

echo -n '// When you quit this editor,' >! /tmp/toto.mailer
echo 'Acedb will mail this to' >> /tmp/toto.mailer
echo $1 >> /tmp/toto.mailer

# The text, so it can be edited

cat $2 >> /tmp/toto.mailer
\mv  /tmp/toto.mailer $2

echo Editor: $EDITOR $2

# your favorite editor 
if ($?EDITOR) then
  echo starting $EDITOR $2
  /bin/env $EDITOR $2
else
 if (-x emacs) then
  emacs $2
 else 
  vi $2
 endif
endif


# when edited: mail and clean_up
Mail -s acedb_mail $1 < $2
\rm $2

#echo 'done'