I have a script that sends out email to sysadmin group when a server is powered on or off. The email contains dump of some important logs like /var/log/messages, /var/log/secure, /var/log/boot.log . The /var/log/boot.log contains some special characters which when sent in email looks garbled as it contains some special formatting chars for coloring and tabs. How do I remove these special characters to make it readable?I know I can use sed to remove the characters but I am looking for an easy and elegant solution.(The /var/log/boot.log is from CentOS 6.x)Here's a dump of my /var/log/boot/.log:[root@vagrant ~]# cat -v /var/log/boot.log ^[%G            Welcome to ^[[0;36mCentOS^[[0;39m ^MStarting udev: ^[%G^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MSetting hostname vagrant:  ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MSetting up Logical Volume Management:   5 logical volume(s) in volume group vgdynamic now active^M  3 logical volume(s) in volume group vgstatic now active^M^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MChecking filesystems^M/dev/mapper/vgstatic-lvroot: clean, 8102/884736 files, 175959/3537920 blocks^M/dev/sda1: clean, 44/32768 files, 17226/131072 blocks^M/dev/mapper/vgdynamic-lvhome: clean, 10280/196608 files, 74141/786432 blocks^M/dev/mapper/vgdynamic-lvopt: clean, 932/655360 files, 104046/2620416 blocks^M/dev/mapper/vgstatic-lvtmp: clean, 12/131072 files, 25386/524288 blocks^M/dev/mapper/vgstatic-lvusr: clean, 41785/262144 files, 236524/1048576 blocks^M/dev/mapper/vgdynamic-lvvar: clean, 1989/393216 files, 93057/1572864 blocks^M/dev/mapper/vgdynamic-lvvarlog: clean, 55/49152 files, 8030/196608 blocks^M/dev/mapper/vgdynamic-lvaudit: clean, 14/65536 files, 73366/262144 blocks^M^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MRemounting root filesystem in read-write mode:  ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MMounting local filesystems:  ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MEnabling /etc/fstab swaps:  ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MEntering non-interactive startup^MCalling the system activity data collector (sadc)... ^MStarting monitoring for VG vgdynamic:   5 logical volume(s) in volume group vgdynamic monitored^M^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting monitoring for VG vgstatic:   3 logical volume(s) in volume group vgstatic monitored^M^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MBringing up loopback interface:  ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MBringing up interface eth0:  ^MDetermining IP information for eth0... done.^M^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting auditd: ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting system logger: ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting lwsmd: ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MMounting filesystems:  ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MRetrigger failed udev events^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting the VirtualBox Guest Additions ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting VirtualBox Guest Addition service ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting sshd: ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting ntpd: ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting crond: ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^MStarting atd: ^[[60G[^[[0;32m  OK  ^[[0;39m]^M^M[root@vagrant ~]# 
Remove control characters from /var/log/boot.log
special characters