* sending text file as attachement to Windows (Outlook)
@ 2003-12-04 14:33 MB
2003-12-04 19:21 ` Paul Szabo
2003-12-04 20:00 ` Adam Price
0 siblings, 2 replies; 4+ messages in thread
From: MB @ 2003-12-04 14:33 UTC (permalink / raw)
I would like to send a text file as an attachement to Windows outlook from
tru64 Unix.
# cat /tmp/file.txt | uuencode file.txt | mailx -s test someone@xzy.com
This works, however when you view the file in notepad it doesn't look right.
Can anyone help
Regards
M
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sending text file as attachement to Windows (Outlook)
2003-12-04 14:33 sending text file as attachement to Windows (Outlook) MB
@ 2003-12-04 19:21 ` Paul Szabo
2003-12-04 19:29 ` Joseph Dionne
2003-12-04 20:00 ` Adam Price
1 sibling, 1 reply; 4+ messages in thread
From: Paul Szabo @ 2003-12-04 19:21 UTC (permalink / raw)
To: MB
MB wrote:
> I would like to send a text file as an attachement to Windows outlook from
> tru64 Unix.
>
> # cat /tmp/file.txt | uuencode file.txt | mailx -s test someone@xzy.com
>
> This works, however when you view the file in notepad it doesn't look right.
I guess the problem is the line termination: a single NL character (hex 0A)
is used in UNIX, while Windows uses the two-character CR-LF (hex 0D 0A).
Replace cat by:
perl -pe 's/$/\r/' /tmp/file.txt | uuencode ...
--
Paul Szabo - psz@maths.usyd.edu.au http://www.maths.usyd.edu.au:8000/u/psz/
School of Mathematics and Statistics University of Sydney 2006 Australia
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sending text file as attachement to Windows (Outlook)
2003-12-04 19:21 ` Paul Szabo
@ 2003-12-04 19:29 ` Joseph Dionne
0 siblings, 0 replies; 4+ messages in thread
From: Joseph Dionne @ 2003-12-04 19:29 UTC (permalink / raw)
And for those non-perl users;
cat /tmp/file.txt | sed -e "s/$/^M/" | uuencode ...
"^M" enter with Ctrl-V, Ctrl-M
Paul Szabo wrote:
> MB wrote:
>
>
>>I would like to send a text file as an attachement to Windows outlook from
>>tru64 Unix.
>>
>># cat /tmp/file.txt | uuencode file.txt | mailx -s test someone@xzy.com
>>
>>This works, however when you view the file in notepad it doesn't look right.
>
>
> I guess the problem is the line termination: a single NL character (hex 0A)
> is used in UNIX, while Windows uses the two-character CR-LF (hex 0D 0A).
> Replace cat by:
>
> perl -pe 's/$/\r/' /tmp/file.txt | uuencode ...
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sending text file as attachement to Windows (Outlook)
2003-12-04 14:33 sending text file as attachement to Windows (Outlook) MB
2003-12-04 19:21 ` Paul Szabo
@ 2003-12-04 20:00 ` Adam Price
1 sibling, 0 replies; 4+ messages in thread
From: Adam Price @ 2003-12-04 20:00 UTC (permalink / raw)
In news:1d08b916.0312040633.41aa5475@posting.google.com,
MB <mb301@hotmail.com> typed:
> I would like to send a text file as an attachement to Windows
> outlook from tru64 Unix.
>
> # cat /tmp/file.txt | uuencode file.txt | mailx -s test
> someone@xzy.com
>
> This works, however when you view the file in notepad it doesn't
> look right.
>
> Can anyone help
>
> Regards
> M
uuencode file.wri < file.txt | mailx -s test
This causes the file to open in wordpad instead, wordpad can handle
unix line-termination just fine and the file looks OK.
Hope this helps
Adam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-12-04 20:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-04 14:33 sending text file as attachement to Windows (Outlook) MB
2003-12-04 19:21 ` Paul Szabo
2003-12-04 19:29 ` Joseph Dionne
2003-12-04 20:00 ` Adam Price
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox