File tree 1 file changed +12
-18
lines changed
1 file changed +12
-18
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/zsh
2
2
3
-
4
-
3
+ student_number=201111365
4
+ student_name=坂口和彦
5
+ alias mail_command=" ssh ` coins-imac` 'sendmail -t'"
5
6
6
7
attachment (){
7
- cat << EOT
8
- Content-Type: text/plain; charset=UTF-8; name="$1 "
9
- Content-Disposition: attachment; filename="$1 "
8
+ << EOT
9
+ ------
10
+ Content-Type: $1 ; charset=$2
11
+ Content-Disposition: attachment; filename="$3 "
10
12
Content-Transfer-Encoding: base64
11
13
12
14
EOT
13
15
base64
14
16
}
15
17
16
18
{
17
- cat << EOT
18
- From: $from_addr
19
- To: $to_addr
19
+ << EOT
20
+
20
21
Subject: STEC:report
21
22
Content-Type: multipart/mixed; boundary="----"
22
23
23
- ------
24
- EOT
25
- attachment student.txt << EOT
26
- 201111365
27
- 坂口和彦
28
24
EOT
29
- for f in $@ ; do
30
- echo ------
31
- attachment " stec-` head -n 1 $f | tail -c +2` .rkt" < $f
32
- done
25
+ (echo $student_number ; echo $student_name ) | attachment text/plain UTF-8 student.txt
26
+ for f in $@ ; attachment text/x-scheme UTF-8 " stec-` head -n 1 $f | tail -c +2` .rkt" < $f
33
27
echo --------
34
- } | ssh ` coins-imac ` " sendmail -t "
28
+ } | mail_command
You can’t perform that action at this time.
0 commit comments