一、将/etc/issue文件中的内容转换为大写后保存至/tmp/issue.out文件中
[root@centos7 ~]#cat /etc/issue | tr [:lower:] [:upper:] > /tmp/issue.out
[root@centos7 ~]#cat /tmp/issue.out
\S
KERNEL \R ON AN \M
TTY: /L
HOSTNAME: /N
TIME: /T
二、将当前系统登录用户的信息转换为大写后保存至/tmp/who.out文件中
[root@centos7 ~]#who | tr [:lower:] [:upper:] > /tmp/who.out
[root@centos7 ~]#cat /tmp/who.out
ROOT :0 2019-10-23 01:07 (:0)
ROOT PTS/0 2019-10-23 01:11 (:0)
ROOT PTS/1 2019-10-23 01:11 (192.168.30.1)
三、一个linux用户给root发邮件,要求邮件标题为”help”,邮件正文如下:
Hello, I am 用户名.
The system version is here.
Please help me to check it, thanks!
操作系统版本信息
[root@centos6 ~]#mail -s 'help' root <<EOF
> Hello, i am $USER.
> The system version is here.
> Please help me to check it, thanks!
> `OS version is lsb_rele