<?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 Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950042#M926902</link>
    <description>A have a file like this &lt;BR /&gt;122^M&lt;BR /&gt;How can I do if I want to a new file whitout ^M&lt;BR /&gt;Thanks</description>
    <pubDate>Sun, 13 Apr 2003 15:14:39 GMT</pubDate>
    <dc:creator>castro_2</dc:creator>
    <dc:date>2003-04-13T15:14:39Z</dc:date>
    <item>
      <title>Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950042#M926902</link>
      <description>A have a file like this &lt;BR /&gt;122^M&lt;BR /&gt;How can I do if I want to a new file whitout ^M&lt;BR /&gt;Thanks</description>
      <pubDate>Sun, 13 Apr 2003 15:14:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950042#M926902</guid>
      <dc:creator>castro_2</dc:creator>
      <dc:date>2003-04-13T15:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950043#M926903</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You would typically use sed to do a job like this:&lt;BR /&gt;&lt;BR /&gt;# cat file|sed -e 's/\^M$//' &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;This will go through each line in the file taking the ^M from the end.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;James.</description>
      <pubDate>Sun, 13 Apr 2003 15:39:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950043#M926903</guid>
      <dc:creator>James Murtagh</dc:creator>
      <dc:date>2003-04-13T15:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950044#M926904</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;Just thinking, if that is a control character at the end you will need to use something like:&lt;BR /&gt;&lt;BR /&gt;# cat file|sed -e 's/.$//' &amp;gt; newfile &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;James.</description>
      <pubDate>Sun, 13 Apr 2003 16:00:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950044#M926904</guid>
      <dc:creator>James Murtagh</dc:creator>
      <dc:date>2003-04-13T16:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950045#M926905</link>
      <description>To remove control characters (ie ^M) from a file created in Windows using vi???.&lt;BR /&gt;&lt;BR /&gt;&lt;ESC&gt; :%s/&lt;CTRL-V&gt;+char(M)/ /g &lt;BR /&gt;&lt;BR /&gt;--- global search/replace EOL&lt;BR /&gt;&lt;BR /&gt;so,&lt;BR /&gt;# vi filename&lt;BR /&gt;Hit &lt;ESC&gt;&lt;BR /&gt;:%s/&lt;CTRL-V&gt;+char(M)/ /g&lt;BR /&gt;Hit &lt;RETURN&gt;&lt;BR /&gt;&lt;BR /&gt;Check to see that the control chars are gone, and save the file.&lt;BR /&gt;&lt;/RETURN&gt;&lt;/CTRL-V&gt;&lt;/ESC&gt;&lt;/CTRL-V&gt;&lt;/ESC&gt;</description>
      <pubDate>Sun, 13 Apr 2003 16:15:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950045#M926905</guid>
      <dc:creator>Jon Mattatall</dc:creator>
      <dc:date>2003-04-13T16:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950046#M926906</link>
      <description>Well, that even looks confusing to me, and I wrote it.&lt;BR /&gt;&lt;BR /&gt;&lt;CTRL-V&gt;+char(M) means hit them all at once, and you'll see the ^M appear on screen.  Just hitting the carat (^) and M doesn't work.&lt;BR /&gt;&lt;BR /&gt;Hold down &lt;CTRL&gt;, v, and hit m (or whatever character's in your file).&lt;/CTRL&gt;&lt;/CTRL-V&gt;</description>
      <pubDate>Sun, 13 Apr 2003 16:22:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950046#M926906</guid>
      <dc:creator>Jon Mattatall</dc:creator>
      <dc:date>2003-04-13T16:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950047#M926907</link>
      <description>You may be able to delete these control chars with dos2ux command.&lt;BR /&gt;$ dos2ux oldfile &amp;gt; newfile&lt;BR /&gt;</description>
      <pubDate>Sun, 13 Apr 2003 16:27:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950047#M926907</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-04-13T16:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950048#M926908</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I suspect that you transfered your file from a Windows environment using binary transfer mode.  If that's the case, in the future, whenever you have a text file toggle an ASCI transfer mode.  Doing so automatically invokes the translation of linefeed/carriage return characters used for Windows end-of-line control to the newline character used for Unix (and vice versa).&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 13 Apr 2003 20:08:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950048#M926908</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-04-13T20:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950049#M926909</link>
      <description>Whenever you see ^M using the vi editor, you can be sure that somone transferred an ASCII file from a PC to HP-UX (or most flavors of UNix) using a binary or untranslated method with ftp or tape/CDROM archives. The same is true for files shared between Windows and Unix using SAMBA or CIFS/9000. Windows chose to ignore Unix standards for ASCII file formats but HP-UX does indeed provide a translator: dos2ux and ux2dos. These tools are required when trying to mix operating systems and file formats.</description>
      <pubDate>Sun, 13 Apr 2003 21:12:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950049#M926909</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-04-13T21:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950050#M926910</link>
      <description>I generally find that I get a ^M at the end if I transfer it from my PC (windows 2000) using bin mode.... ftp the file again but type ascii before you transfer it... if you don't want to bother with this you could type &lt;BR /&gt;cat file | sed 's/.$//g' &amp;gt; outfile&lt;BR /&gt;&lt;BR /&gt;(it's a control character and thus ^M is actually only 1 character)</description>
      <pubDate>Mon, 14 Apr 2003 12:07:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950050#M926910</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-04-14T12:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950051#M926911</link>
      <description>Looks like the usual subjects were identified by everyone.&lt;BR /&gt;&lt;BR /&gt;If your logfile truly is a logfile&lt;BR /&gt;Piping the output through "strings" will clear out ^M as well as other unwanted control characters.&lt;BR /&gt;&lt;BR /&gt;strings log.file &amp;gt; newlog.file&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;cat log.file|strings &amp;gt; newlog.file</description>
      <pubDate>Mon, 14 Apr 2003 14:28:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2950051#M926911</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2003-04-14T14:28:38Z</dc:date>
    </item>
  </channel>
</rss>

