I have a file which was created by a script which will be colored when I open using cat. But when I tried to send that file as attachment, it is not showing properly. Like below it is showing.^[[33m================================================================================^[[m                            ^[[34m172.29.0.110^[[m^[[33m================================================================================^[[mFilesystem              Size    Used    Avail   Use%    Mounted on/dev/mapper/centos  109G   13G   91G  13% //dev/mapper/mpatha       1.6T  1.3T  277G  83% /var/lib/SQL^[[33m================================================================================^[[m                            ^[[34m172.29.8.110^[[m^[[33m================================================================================^[[mFilesystem              Size    Used    Avail   Use%    Mounted on/dev/mapper/centos  117G  9.1G  102G   9% //dev/mapper/mpatha       1.6T  1.4T  109G  93% /var/lib/SQL^[[33m================================================================================^[[m                            ^[[34m172.29.16.110^[[m^[[33m================================================================================^[[mFilesystem              Size    Used    Avail   Use%    Mounted on/dev/mapper/centos      117G   18G   94G  17% //dev/mapper/VG01-LV 1.5T  812G  590G  58% /var/lib/SQL^[[33m================================================================================^[[m                            ^[[34m172.29.26.110^[[m^[[33m================================================================================^[[mFilesystem              Size    Used    Avail   Use%    Mounted on/dev/mapper/LogVol02  117G   22G   90G  20% //dev/mapper/mpathm    1.6T  1.1T  435G  71% /var/lib/SQLThe script(part of the script) that creates the file is ::for IP in $(cat file.txt); do    (echo -e  \e[33m$LINE\e[m    echo -e                             \e[34m$IP\e[m                                     echo -e \e[33m$LINE\e[m    echo -e Filesystem\t\tSize\tUsed\tAvail\tUse%\tMounted\ton    ssh $SSH_ARG -q user@${IP} df -Ph | egrep -iv 'filesystem|boot|tmpfs') >> /disk_${DATE}_log    echo -e \e[33m$LINE\e[m    echo Successful for $IPdonecat disk_${DATE}_log | mail -s Disk space mail@mail.comI can remove those echo's that creating colors, but I want to know is there any way I can send this file properly by mail or can I do something in mail command to solve this?
How to convert a colored file to mail readable in bash?
linux;bash;files;sendmail