tr 【-ds】string
-d 删除信息中string的字符串
-s 取代掉重复的字符!
root@ubuntu:~# last
develope pts/1 10.230.68.76 Thu Sep 22 14:53 still logged in
develope pts/0 10.230.68.76 Wed Sep 21 10:57 - 14:53 (1+03:56)
reboot system boot 4.4.0-38-generic Wed Sep 21 10:52 still running
develope pts/0 10.230.68.76 Mon Sep 19 11:19 - crash (1+23:32)
develope pts/2 10.230.68.76 Mon Sep 12 13:59 - crash (8+20:53)
develope pts/1 10.230.68.76 Sun Sep 11 10:30 - crash (10+00:22)
develope pts/0 10.230.68.76 Sun Sep 11 10:06 - 13:59 (1+03:53)
wtmp begins Fri Sep 9 17:41:28 2016
root@ubuntu:~# clear
root@ubuntu:~# last |tr '[a-z]' '[A-z]'
DEVELOPE PTS/1 10.230.68.76 THU SEP 22 14:53 STILL LOGGED IN
DEVELOPE PTS/0 10.230.68.76 WED SEP 21 10:57 - 14:53 (1+03:56)
REBOOT SYSTEM BOOT 4.4.0-38-GENERIC WED SEP 21 10:52 STILL RUNNING
DEVELOPE PTS/0 10.230.68.76 MON SEP 19 11:19 - CRASH (1+23:32)
DEVELOPE PTS/2 10.230.68.76 MON SEP 12 13:59 - CRASH (8+20:53)
DEVELOPE PTS/1 10.230.68.76 SUN SEP 11 10:30 - CRASH (10+00:22)
DEVELOPE PTS/0 10.230.68.76 SUN SEP 11 10:06 - 13:59 (1+03:53)