<?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: Remove ^M from shell in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087170#M441732</link>
    <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;1) You have made a mistake with ascii/binary in your ftp transfer. The windows ftp client defaults to ascii which probably caused this.&lt;BR /&gt;2) dos2unix normally fixes this problem, but you may also have to do the download/uplaod over again properly.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Wed, 09 Jan 2008 11:01:35 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2008-01-09T11:01:35Z</dc:date>
    <item>
      <title>Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087168#M441730</link>
      <description>Dear all&lt;BR /&gt;&lt;BR /&gt;i'v upload the nickel in my servers from windows machine.&lt;BR /&gt;but it shows ^M in every line. how can i remove this with command?</description>
      <pubDate>Wed, 09 Jan 2008 10:50:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087168#M441730</guid>
      <dc:creator>Jeeshan</dc:creator>
      <dc:date>2008-01-09T10:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087169#M441731</link>
      <description>hey&lt;BR /&gt;&lt;BR /&gt;check the command: dos2ux&lt;BR /&gt;or search in this forum, you will find a lot of topics.&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Wed, 09 Jan 2008 10:56:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087169#M441731</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2008-01-09T10:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087170#M441732</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;1) You have made a mistake with ascii/binary in your ftp transfer. The windows ftp client defaults to ascii which probably caused this.&lt;BR /&gt;2) dos2unix normally fixes this problem, but you may also have to do the download/uplaod over again properly.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 09 Jan 2008 11:01:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087170#M441732</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2008-01-09T11:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087171#M441733</link>
      <description>hi all&lt;BR /&gt;&lt;BR /&gt;try first transfer file in binary mode.&lt;BR /&gt;&lt;BR /&gt;you can try 'dos2ux &lt;BAD&gt; &amp;gt; &amp;gt;file_good' too&lt;BR /&gt;&lt;BR /&gt;regards&lt;/BAD&gt;</description>
      <pubDate>Wed, 09 Jan 2008 11:05:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087171#M441733</guid>
      <dc:creator>Roberto Arias</dc:creator>
      <dc:date>2008-01-09T11:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087172#M441734</link>
      <description>the old way:&lt;BR /&gt;tr -d "\015" &lt;FILE&gt;file.out&lt;/FILE&gt;</description>
      <pubDate>Wed, 09 Jan 2008 11:16:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087172#M441734</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2008-01-09T11:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087173#M441735</link>
      <description>Here is the tested and proved method to take away the  ^M from any file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# To take off the control chars from a file&lt;BR /&gt;# vi fn &lt;BR /&gt;&lt;BR /&gt;Then Esc column and do the foloowing &amp;gt;&lt;BR /&gt;&lt;BR /&gt;:%s/^M/  ( ie, control v control m) and enter .&lt;BR /&gt;&lt;BR /&gt;This will take away the control Chracters.&lt;BR /&gt;&lt;BR /&gt;If its a small file, you can even do # cat filename &amp;gt; newname   &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds/ Kggj&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Jan 2008 15:38:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087173#M441735</guid>
      <dc:creator>kggj</dc:creator>
      <dc:date>2008-01-09T15:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087174#M441736</link>
      <description>using vi:&lt;BR /&gt;&lt;BR /&gt;To remove the characters use the command sequence&lt;BR /&gt;     :1,$s/^V^M//&lt;BR /&gt;followed by a return.&lt;BR /&gt;Note: Please be aware that the ^V will not echo on your screen,&lt;BR /&gt;      but ^M will.</description>
      <pubDate>Wed, 09 Jan 2008 16:02:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087174#M441736</guid>
      <dc:creator>MikeL_4</dc:creator>
      <dc:date>2008-01-09T16:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087175#M441737</link>
      <description>Here's a link on handling characters with sed:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www-h.eng.cam.ac.uk/help/tpl/unix/sed.html" target="_blank"&gt;http://www-h.eng.cam.ac.uk/help/tpl/unix/sed.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; # IN UNIX ENVIRONMENT: convert DOS newlines (CR/LF) to Unix format&lt;BR /&gt; sed 's/.$//'               # assumes that all lines end with CR/LF&lt;BR /&gt; sed 's/^M$//'              # in bash/tcsh, press Ctrl-V then Ctrl-M&lt;BR /&gt; sed 's/\x0D$//'            # gsed 3.02.80, but top script is easier&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 09 Jan 2008 17:58:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087175#M441737</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2008-01-09T17:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087176#M441738</link>
      <description>HI:&lt;BR /&gt;&lt;BR /&gt;# perl -pe 's%\r\n%\n%; s%\032%% if eof' file&lt;BR /&gt;&lt;BR /&gt;...mimics the HP-UX 'dos2ux' command including handling the 'sub' character (^Z) that marks the end of a DOS file.&lt;BR /&gt;&lt;BR /&gt;To update your file(s) inplace and keep a backup copy as '.old', do:&lt;BR /&gt;&lt;BR /&gt;# perl -pi.old -e 's%\r\n%\n%; s%\032%% if eof' file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Jan 2008 18:04:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087176#M441738</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-01-09T18:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087177#M441739</link>
      <description>Thanks steven for correction.&lt;BR /&gt;I have uploaded in binary mode, it'll be in ascii mode.&lt;BR /&gt;&lt;BR /&gt;Thanks everyone for your great support.</description>
      <pubDate>Thu, 10 Jan 2008 07:42:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087177#M441739</guid>
      <dc:creator>Jeeshan</dc:creator>
      <dc:date>2008-01-10T07:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Remove ^M from shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087178#M441740</link>
      <description>One thing about using sed to remove the control-M.  It is possible for files to sometimes have text but no lines.  I had an EDI file like this.  If this is the case, the sed command will not remove the control-M because it never had a complete line to work on. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Jan 2008 13:10:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-m-from-shell/m-p/5087178#M441740</guid>
      <dc:creator>Steve Post</dc:creator>
      <dc:date>2008-01-10T13:10:55Z</dc:date>
    </item>
  </channel>
</rss>

