linux学生写的脚本怎样传给老师

linux学生写的脚本怎样传给老师,第1张

系统交卷子。

1、首先linux是一款线上学习考试系统,其次在线上考试完成脚本后进行系统提交试卷。

2、最后在linux系统中完成后,点击系统右上角的提交键交给老师。

1、编辑用户Home目录下的.muttrc文件,设置发信环境。

# cat /root/.muttrc

set envelope_from=yes

set [email protected]

set realname="Owinux"

set use_from=yes

set rfc2047_parameters=yes

set charset="utf-8"

2、发信脚本

# cat automail.sh

#!/bin/sh

# automail.sh

DIR=/root/owinux

mailcontent=$DIR/mailcontent

>"$mailcontent"

echo -e "owinux,您好!\n" >>$mailcontent

echo -e "\t附件为 `date +%Y-%m-%d` 设备日检报告,敬请查收。" >>$mailcontent

cat mailcontent | /usr/bin/mutt -s "设备日检报告" -a /root/owinux/report.xls [email protected] -c [email protected] -c [email protected]

3、简要说明:

-s:指定主题

-a:附件

-c:抄送,需要抄送多人的话,须使用多个 -c 选项

使用上面的发信环境可以保证在页面查看邮件的时候,附件名不出现乱码。

其中 .muttrc 的 "set from"可以随便设置,可以是不存在的邮箱地址,当然正确的最好。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/7308713.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-04
下一篇 2023-04-04

发表评论

登录后才能评论

评论列表(0条)

保存