i am using simple bash script which stores values in file and those content of file sends to appropriate email.
the output of bash command comes like this:-
but when i sends this output, i am getting like this
Its not in proper format. shell script code is as follows-
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head -4 >> /tmp/abc.txt
mail -s"mail" abc@gmail.com < /tmp/abc.txt
Please help me to sort out this formatting issue. I am new to bash scripting.