Bash script output ASCII only!

I have an rsync script that runs every night to keep a folder synced with another PC.  I need to email someone in my group with the output of the rsync script daily.

So I have the rsync command output to a file, but when I email it, it comes through as an attachment named SUBJECT.dat

But if I mail myself the /etc/fedora-release file I see the contents as the body of the message not an attachment.  

So I did the following:
$ file /etc/fedora-release
/etc/fedora-release: ASCII text

and
$ file rsync.log.12-28-11
rsync.log.12-28-11: ASCII English text, with CR, LF line terminators

This led me to believe that its the encoding that is causing it to show as an attachment.  My office email only allows text email, no html or rich text.

Some more info:
I am using Fedora 16 with sendmail.
I use the following command to send the email:
mail -s "Subject" recipient@domain.com < file

So it seems I need to have the rsync script either create the log file as ASCII only on convert it somehow.  
Any ideas?



LVL 23
savoneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

simon3270Commented:
You can remove the CR with:

    tr -d '\015' < file | mail -s "Subject" recipient@domain.com
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
savoneAuthor Commented:
Perfect Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.