Thank you very much for ur solution.
I create the output file with (.csv) extension. Good idea..
Can you tell me how to send this file to our team as attachment mail. I used the below command but I am not getting the mail with attachment. I am getting the mail with some junk characters.
(uuencode attach.txt attach.txt ; echo "mail_body")|mailx -m -s "subject" firstname.lastname@example.org
Can anyone give me any idea in this?
Thanks in advance.