On Mon, Oct 16, 2000 at 07:34:18PM -0500, Ray Niccolls wrote:
<em>> I was trying to write a script to use vi to translate unix to dos text 
(i.e. replace the LF with a CR/LF).
<em>> Unfortunately when I look at a file of either kind in vi with "set list" 
to show the invisible characters it just shows the end of line as a $.  I can 
search for the LF with /^v^m, but I don't know what to put in to substitue the 
CR/LF for DOS.  I know that there are utils that do this, but I just wanted to 
see if it could be done in vi as a point of curiosity.  If not does anyone have 
a sed or perl script that does the same thing?  Thanks in advance.  
you're pretty close, actually.  in ex mode (press ESC)
:%s/<ctrl-v><enter>//g 
will do the job inside vi dumping the CR and leaving the LF.
Of course there are many  easy ways to do with sed or perl....
<p>
-- 
Scott Harney<[EMAIL PROTECTED]>
 PGP Key fingerprint = 6D 31 C3 00 77 8C D1 C2 59 0A 01 E3 AF 81 94 63
================================================
BRLUG - The Baton Rouge Linux User Group
Visit http://www.brlug.net for more information.
Send email to [EMAIL PROTECTED] to change
your subscription information.
================================================

<!-- body="end" -->
<hr noshade>
<ul>
<li><strong>Next message:</strong> John Beamon: "RE: [brluglist] Meeting Place"
<li><strong>Previous message:</strong> Dustin Puryear: "Re: [brluglist] Dos to 
Unix or vice versa text."
<li><strong>In reply to:</strong> Ray Niccolls: "[brluglist] Dos to Unix or 
vice versa text."
<li><strong>Messages sorted by:</strong> 
[ date ]
[ thread ]
[ subject ]
[ author ]
[ attachment ]
</ul>
<hr noshade>

<small>
<em>
This archive was generated by hypermail 2.1.2 
: <em>Thu Sep 06 2001 - 11:10:49 CDT</em>
</em>
</small>
</body>
</html>

Reply via email to