<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Thanks to all and a special thanks to Ted Dodd.<br>
<br>
Here is what I ended up doing.<br>
<br>
# remove any nul<br>
<b>tr -d '\000' &lt; $1 &gt; $1.nul</b><br>
# remove any ~<br>
<b>sed 's/~//g' &lt; $1.nul &gt; $1.sed</b><br>
#remove any carriage-returns<br>
<b>tr -d '\r' &lt; $1.sed &gt; $1.ncr</b><br>
#remove any line feeds<br>
<b>tr -d '\n' &lt; $1.ncr &gt; $1.new</b><br>
#clean up<br>
<b>rm $1.nul $1.sed $1.ncr</b><br>
#move result to my working area to be imported<br>
<b>mv $1.new /appl/servefx/shared/working</b><br>
<br>
<br>
Richard D. Williams<br>
<br>
<br>
Ted B Dodd wrote:<br>
<blockquote type="cite" cite="mid40EAE5FB.22102.240B263B@localhost">
  <pre wrap="">cat filename | tr "\015" "~"

That should have worked, eh?

sed 's/^M//g' &lt; filename &gt; filename.new

That ^M is a control-M.

Try this in vi the first time to see if it will work for you.  
If you know vi, forgive the tutorial

vi filename &lt;ENTER&gt;
:1,$s/CTRL-V then CTRL-M//g &lt;ENTER&gt;
:x &lt;ENTER&gt;

You use CTRL-V to make the next charater show up right.  

Let me know how it goes.  If the sed works, you can create a 
short script that does the work for you.  If you are using SCO, 
the "dtox" command should also work as in: 

"dtox filename &gt; filename.new"

On 6 Jul 2004 at 16:46, Richard D. Williams wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Oops, tr has no replace functionality. maybe a little sed ight 
be in order.

Can sed replace ~@~ with ~?

Richard

<a class="moz-txt-link-abbreviated" href="mailto:teddodd@comcast.net">teddodd@comcast.net</a> wrote:
    I am confused.  Is this Unix?  If so, who created the mysql database export?  Do you have a file created by mysql to import?  Does every record have this offensive CR? If so, would a little sed script work for you?
    
    Ted B
    
    
      
    When importing data from a mysql database, is there any way in filepro 
    to find and replace a carriage-return in a field?
    
    I can nont get the programmer I am dealing with to do it on his end.
    
    All comments welcome as usual,
    
    Richard D. Williams
    The Applications Group
    
    _______________________________________________
    Filepro-list mailing list
    <a class="moz-txt-link-abbreviated" href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a>
    <a class="moz-txt-link-freetext" href="http://mailman.celestial.com/mailman/listinfo/filepro-list">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>
        
    
    
    
      
    </pre>
  </blockquote>
  <pre wrap=""><!---->




  </pre>
</blockquote>
</body>
</html>