tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* unix2dos, Can it be used to not alter original file?
@ 1997-04-18 16:18 George Gallen
  0 siblings, 0 replies; only message in thread
From: George Gallen @ 1997-04-18 16:18 UTC (permalink / raw)
  To: tru64-unix-managers


I have tried multiple ways using redirection and piping, but to no avail,
I have also tried using MTOOLS mcopy (with the t option) to create a
   temp file, but it seems you cant use mcopy to go unix->unix.

What am I trying to do? I want to email a file as an attachment (ie). and
have the lf converted to lf/cr (the file will be read on an MSDOS   
machine).

Ultimatly I want to be able to do something like....

unix2dos origfile |  uuencode OUTPUTNAME | mailx -s xxx user@domain

I tried using sed (which worked excellent from the command line) but.....
   I am attempting to use this from a shell from a database program,
    which I cannot embedd ^V^M for sed to do its stuff.

I tried adding the sed command as an alias to my .cshrc file, but I can't   
get
  to function correctly (this way instead of embedding ^V^M I could use a
  preset alias) :

alias unix2dos "/usr/bin/sed -e 's/$/^M/'"  (the ^M is typed in as ^V^M)
   (which gives "varible syntax" when sourced).

SO.......
   What am I doing wrong with my alias.........or
   How do you get unix2dos to not change original file.......or
   Can Mtools be used (with t option) to do lf->cr/lf while doing   
unix->unix.

Not too tough I hope.

George Gallen
ggallen@slackinc.com   

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-04-18 16:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-18 16:18 unix2dos, Can it be used to not alter original file? George Gallen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox