I have created a file with some different lines of text, like for example:
2345, someinfo1, someinfo2, someinfo3
3567, someinfo1, someinfo2, someinfo3
7812, someinfo1, someinfo2, someinfo3
where someinfo1, someinfo2 and someinfo3 are usually (if not always) different data.
And I need to include the above file output at a mail as body text. So I am doing:
$ cat myfile.txt | mail mymail@mail.com
However, I get to see output of file inside mail body as a single line (like below) and not as it should show with multiple lines, as above:
2345, someinfo1, someinfo2, someinfo3 3567, someinfo1, someinfo2, someinfo3 7812, someinfo1, someinfo2, someinfo3
I need your help to solve this problem. I believe that problem is that mail is using HTML format to display the file and thus file needs to somehow interpret the end of line ($) at all lines of the file so that for every line it will display the next line below current line and not at the same line. I have managed to insert new line at end of every line, but this would display at mail the file with blank line after every line, i.e.:
2345, someinfo1, someinfo2, someinfo3
3567, someinfo1, someinfo2, someinfo3
7812, someinfo1, someinfo2, someinfo3
It shows better than displaying everything in 1 line, however, this is not what I want to do, I don't want to display blank line after every line. Any suggestions to achieve what I need for mail output of file is more than welcome!