<?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 Breaking up is hard to do in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468025#M774737</link>
    <description>I'm trying to take a file that I ftp'd from an NT server, and insert a newline (or carriage return) character after every instance of '&amp;gt;'. My problem is sed is interpreting \012 literally, and my file ends up looking like the following:&lt;BR /&gt;&lt;SOME stuff="" here=""&gt;\012&lt;SOME more="" stuff=""&gt;\012&lt;BR /&gt;instead of:&lt;BR /&gt;&lt;SOME stuff="" here=""&gt;&lt;BR /&gt;&lt;SOME more="" stuff=""&gt;&lt;BR /&gt;Can anyone help?  Thanks in advance&lt;/SOME&gt;&lt;/SOME&gt;&lt;/SOME&gt;&lt;/SOME&gt;</description>
    <pubDate>Tue, 28 Nov 2000 16:57:41 GMT</pubDate>
    <dc:creator>Maureen Gunkel</dc:creator>
    <dc:date>2000-11-28T16:57:41Z</dc:date>
    <item>
      <title>Breaking up is hard to do</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468025#M774737</link>
      <description>I'm trying to take a file that I ftp'd from an NT server, and insert a newline (or carriage return) character after every instance of '&amp;gt;'. My problem is sed is interpreting \012 literally, and my file ends up looking like the following:&lt;BR /&gt;&lt;SOME stuff="" here=""&gt;\012&lt;SOME more="" stuff=""&gt;\012&lt;BR /&gt;instead of:&lt;BR /&gt;&lt;SOME stuff="" here=""&gt;&lt;BR /&gt;&lt;SOME more="" stuff=""&gt;&lt;BR /&gt;Can anyone help?  Thanks in advance&lt;/SOME&gt;&lt;/SOME&gt;&lt;/SOME&gt;&lt;/SOME&gt;</description>
      <pubDate>Tue, 28 Nov 2000 16:57:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468025#M774737</guid>
      <dc:creator>Maureen Gunkel</dc:creator>
      <dc:date>2000-11-28T16:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking up is hard to do</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468026#M774738</link>
      <description>I don't believe that \012 is what you want to use. I think it is \015&lt;BR /&gt;&lt;BR /&gt;You may also want to look at the tr command.</description>
      <pubDate>Tue, 28 Nov 2000 17:02:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468026#M774738</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2000-11-28T17:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking up is hard to do</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468027#M774739</link>
      <description>&lt;BR /&gt;Use tr. Eg, input file (called tt) looks like;&lt;BR /&gt;aaa&amp;gt;bbb&amp;gt;ccc&amp;gt;&lt;BR /&gt;&lt;BR /&gt;tr "[&amp;gt;]" "[\012]" &amp;lt; tt&lt;BR /&gt;&lt;BR /&gt;gives output;&lt;BR /&gt;&lt;BR /&gt;aaa&lt;BR /&gt;bbb&lt;BR /&gt;ccc&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2000 17:11:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468027#M774739</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2000-11-28T17:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking up is hard to do</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468028#M774740</link>
      <description>Stefan:&lt;BR /&gt;That gets me a lot closer, but I need to retain the '&amp;gt;' character.  For example, aaa&amp;gt;bbbb&amp;gt;ccc&amp;gt; needs to be turned into:&lt;BR /&gt;aaa&amp;gt;&lt;BR /&gt;bbbb&amp;gt;&lt;BR /&gt;ccc&amp;gt;&lt;BR /&gt;Any ideas?</description>
      <pubDate>Tue, 28 Nov 2000 17:30:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468028#M774740</guid>
      <dc:creator>Maureen Gunkel</dc:creator>
      <dc:date>2000-11-28T17:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking up is hard to do</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468029#M774741</link>
      <description>Here is how I was able to get the desired output:&lt;BR /&gt;&lt;BR /&gt;sed 's/&amp;gt;/&amp;gt;Z/g' test | tr "&amp;gt;Z" "&amp;gt;\012]"&lt;BR /&gt;&lt;BR /&gt;I chose a character to put after the '&amp;gt;' symbol and then did a grep on the file to make sure that that sequence didn't occur in the file. &lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2000 21:06:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468029#M774741</guid>
      <dc:creator>Tony Vilardi</dc:creator>
      <dc:date>2000-11-28T21:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking up is hard to do</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468030#M774742</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;...Yet another way to do it.  Enter this exactly as shown below, that is, span the command over two lines.&lt;BR /&gt;&lt;BR /&gt;sed  's/&amp;gt;/&lt;BR /&gt;/g' file&lt;BR /&gt;&lt;BR /&gt;Bruce</description>
      <pubDate>Wed, 29 Nov 2000 04:25:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468030#M774742</guid>
      <dc:creator>Bruce Regittko_1</dc:creator>
      <dc:date>2000-11-29T04:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking up is hard to do</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468031#M774743</link>
      <description>maybe a little easier is:&lt;BR /&gt;&lt;BR /&gt;sed 's/&amp;gt;/&amp;gt;\\^J/g' file&lt;BR /&gt;&lt;BR /&gt;don't how the backslashes,etc will come out,&lt;BR /&gt;but that is a backslash cnt-J&lt;BR /&gt;&lt;BR /&gt;this will probably leave you with a blank line at the end&lt;BR /&gt;of your output.  if you want that removed:&lt;BR /&gt;&lt;BR /&gt;| sed '/^$/d'  to delete empty lines.&lt;BR /&gt;&lt;BR /&gt;another way is:&lt;BR /&gt;&lt;BR /&gt;cat file | awk -F\&amp;gt; '{ for ( i=1;i&amp;lt;=NF;i++) print $i "&amp;gt;";}'&lt;BR /&gt;&lt;BR /&gt;you'll end up with a blank line with that method also.&lt;BR /&gt;&lt;BR /&gt;both sed and awk are line based utilities, meaning if your lines are longer then a few thousand characters&lt;BR /&gt;they will give you a "line too long" error.&lt;BR /&gt;&lt;BR /&gt;in which case you probably have to use "tr" to break up you line into small segments then add the &amp;gt; back to the end of the lines&lt;BR /&gt;&lt;BR /&gt;cat file | tr "&amp;gt;" "\012" | sed -e 's/\(.*\)/\1&amp;gt;/' -e '/^$/d'</description>
      <pubDate>Wed, 29 Nov 2000 08:04:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/breaking-up-is-hard-to-do/m-p/2468031#M774743</guid>
      <dc:creator>curt larson</dc:creator>
      <dc:date>2000-11-29T08:04:29Z</dc:date>
    </item>
  </channel>
</rss>

