Coding help with export
Del
del at altsystem.com
Thu Apr 12 11:49:28 PDT 2007
Hi:
I feel dumb asking this, but I have wasted a lot of time already without a solution, so maybe it is not as easy as I thought it should be, either that or my brain is just not with it today (if so, not the first time).
Under SCO Unix, I am using the "export word" command to produce a flat ASCII file. Export word defaults to a record (or line) delimiter of \n (newline). I want to change this to \r\n (carriage return/newline) for compatibility with some windows software that the data is passed to. Well, I have not been able to find any way to do this with "export word" or even with "export ascii" where I thought I could use r=\r\n, but this gives me a syntax error.
I even tried to issue a SED substitution command after generating the output file:
sed s/\n/\r\n/ filename >target filename
sed s/"\n"/"\r\n"/ filename >target filename
I also tried:
tr "\n" "\r\n" - this changed the \n to \r but not to \r\n.
None of this worked, I really don't know much about sed or tr and regular expressions, but thought this had a shot.
So is there any way to export an ASCII file and generate a record delimiter of carriage return/linefeed? Or convert it after generating it with standard Unix commands?
Del
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20070412/a790218f/attachment.html
More information about the Filepro-list
mailing list