<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: vi editor ^M char in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652776#M46441</link>
    <description>Inside vi,  press:  &lt;BR /&gt;!Gcol -bx&lt;BR /&gt;&lt;BR /&gt;See what happen?&lt;BR /&gt;&lt;BR /&gt;/discoverer</description>
    <pubDate>Fri, 25 Jan 2002 08:26:01 GMT</pubDate>
    <dc:creator>discoverer</dc:creator>
    <dc:date>2002-01-25T08:26:01Z</dc:date>
    <item>
      <title>vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652771#M46436</link>
      <description>I found ^M character at the end of each line in my file. How can i eliminate this funny char. Thanks.</description>
      <pubDate>Fri, 25 Jan 2002 07:58:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652771#M46436</guid>
      <dc:creator>Kenn Chen</dc:creator>
      <dc:date>2002-01-25T07:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652772#M46437</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;# cat src.txt | col -b &amp;gt; dst.txt&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;# strings src.txt &amp;gt; dst.txt&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 25 Jan 2002 08:00:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652772#M46437</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-01-25T08:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652773#M46438</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you copied the file from a PC then put it through dos2ux&lt;BR /&gt;&lt;BR /&gt;in vi&lt;BR /&gt;&lt;BR /&gt;:1,$s/cntrlVcntrlM//&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cntrlV = Control+v&lt;BR /&gt;cntrlM = Control+m&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;          Steve Steel</description>
      <pubDate>Fri, 25 Jan 2002 08:18:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652773#M46438</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-01-25T08:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652774#M46439</link>
      <description>Hi,  the ^M is a DOS CR/LF identifier. I guess the file has been modified on a DOS/Windows PC at some time. To remove from within vi try:&lt;BR /&gt;&lt;BR /&gt;: 1,$s/^M//g&lt;BR /&gt;&lt;BR /&gt;N.B  For ^M press Ctrl+v then imediatltly press m&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Jan 2002 08:19:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652774#M46439</guid>
      <dc:creator>John Waller</dc:creator>
      <dc:date>2002-01-25T08:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652775#M46440</link>
      <description>Sorry Steve got it right, you need to keep the CTRL pressed i.e ctrl+v ctrl+m.&lt;BR /&gt;&lt;BR /&gt;Silly thing was I actually tested before I sent the reply.</description>
      <pubDate>Fri, 25 Jan 2002 08:21:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652775#M46440</guid>
      <dc:creator>John Waller</dc:creator>
      <dc:date>2002-01-25T08:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652776#M46441</link>
      <description>Inside vi,  press:  &lt;BR /&gt;!Gcol -bx&lt;BR /&gt;&lt;BR /&gt;See what happen?&lt;BR /&gt;&lt;BR /&gt;/discoverer</description>
      <pubDate>Fri, 25 Jan 2002 08:26:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652776#M46441</guid>
      <dc:creator>discoverer</dc:creator>
      <dc:date>2002-01-25T08:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652777#M46442</link>
      <description>Hello Idris,&lt;BR /&gt;&lt;BR /&gt;You can do this within vi&lt;BR /&gt;&lt;BR /&gt;:1,$ s/^V^M//&lt;BR /&gt;&lt;BR /&gt;(NOTE You need the ^V then ^M&lt;BR /&gt;in order to enter the ^M charatcer)&lt;BR /&gt;&lt;BR /&gt;This will erase the ^M character from each line.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;John&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Jan 2002 08:26:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652777#M46442</guid>
      <dc:creator>John Strang</dc:creator>
      <dc:date>2002-01-25T08:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652778#M46443</link>
      <description>see man dos2ux.&lt;BR /&gt;&lt;BR /&gt;If you get it from Win and ftp use ascii mode.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Jan 2002 08:45:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652778#M46443</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2002-01-25T08:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652779#M46444</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;...or you could do this in vi:&lt;BR /&gt;&lt;BR /&gt;:%s/.$//&lt;BR /&gt;&lt;BR /&gt;to remove the last char from every line.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Fri, 25 Jan 2002 08:51:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652779#M46444</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-01-25T08:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652780#M46445</link>
      <description>Hi there&lt;BR /&gt;&lt;BR /&gt;Use the dos2ux command to strip out microsnot characters!&lt;BR /&gt;&lt;BR /&gt;dos2ux &lt;INPUTFILENAME&gt; &amp;gt; (outputfilename)&lt;BR /&gt;&lt;BR /&gt;MND&lt;/INPUTFILENAME&gt;</description>
      <pubDate>Fri, 25 Jan 2002 08:54:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652780#M46445</guid>
      <dc:creator>Marc Dijkstra</dc:creator>
      <dc:date>2002-01-25T08:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652781#M46446</link>
      <description>in vi &lt;BR /&gt;&lt;BR /&gt;:%s/cntrlV invio//g&lt;BR /&gt;&lt;BR /&gt;with  cntrlV you can insert ^M with invio.&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Jan 2002 13:59:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652781#M46446</guid>
      <dc:creator>Vincenzo Restuccia</dc:creator>
      <dc:date>2002-01-25T13:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652782#M46447</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Another solution&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Problem Description&lt;BR /&gt;&lt;BR /&gt;I have transferred a file from another system, and I am editing the file&lt;BR /&gt;with the vi editor.  The file has embedded carriage returns, which the&lt;BR /&gt;editor is displaying as ^M.  How can I remove these extra characters?&lt;BR /&gt;&lt;BR /&gt;Configuration Info&lt;BR /&gt;&lt;BR /&gt;System 9000 HP-UX&lt;BR /&gt;&lt;BR /&gt;Solution&lt;BR /&gt;&lt;BR /&gt;Use the tr(1) command to remove these characters from the file.&lt;BR /&gt;First, quit the vi editor and then do the following:&lt;BR /&gt;&lt;BR /&gt;Execute the tr command:&lt;BR /&gt;&lt;BR /&gt;     1. tr -d \\015 &amp;lt; inp_file &amp;gt; new_file&lt;BR /&gt;&lt;BR /&gt;     2. Inspect the file new_file with vi to check that the ^M's are gone.&lt;BR /&gt;&lt;BR /&gt;        steve Steel</description>
      <pubDate>Fri, 25 Jan 2002 15:43:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652782#M46447</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-01-25T15:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: vi editor ^M char</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652783#M46448</link>
      <description>Care should be taken when attempting to remove ^M from a file in vi.  You really should anchor it to the end of line.  I have really hosed up shar files w/o doing this when there was a ^M but it wasn't meant as a LF/CR.&lt;BR /&gt;&lt;BR /&gt;%s/^V^M$//g&lt;BR /&gt;&lt;BR /&gt;Should take care of your anchor.</description>
      <pubDate>Fri, 25 Jan 2002 19:04:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-editor-m-char/m-p/2652783#M46448</guid>
      <dc:creator>Eric Buckner</dc:creator>
      <dc:date>2002-01-25T19:04:09Z</dc:date>
    </item>
  </channel>
</rss>

