<?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: Some problem when I define RS in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/some-problem-when-i-define-rs/m-p/4248429#M687450</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;OK, so it seems taht the input can be parsed about and recomposed to produce the same output on some platforms.  Now, what are you really trying to solve?&lt;BR /&gt;&lt;BR /&gt;It seems that 'awk' differs in its behavior on various opearating systems:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.shelldorado.com/articles/awkcompat.html" target="_blank"&gt;http://www.shelldorado.com/articles/awkcompat.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you want a tool that gives highly *consistent* behavior on a large number of platforms, *and* has superior regular expression support: use Perl.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Fri, 08 Aug 2008 11:04:11 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2008-08-08T11:04:11Z</dc:date>
    <item>
      <title>Some problem when I define RS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-problem-when-i-define-rs/m-p/4248426#M687446</link>
      <description>Hi all,&lt;BR /&gt;I've run this on HP-UX and Solaris and it doesn't work while it actually works on Linux.&lt;BR /&gt;Pls check the following details:&lt;BR /&gt;*****************************************&lt;BR /&gt;$ more extract_test.dat&lt;BR /&gt;iTEM_ID||column_value||column1||colomn2@@&lt;BR /&gt;1111||aaaa||bbb||ccc@@&lt;BR /&gt;2222||cccc||ddd||eee@@&lt;BR /&gt;&lt;BR /&gt;$ nawk 'BEGIN{FS="[|][|]";OFS="||";RS="@@\n";ORS="@@\n"}{print $0}' extract_test.dat&lt;BR /&gt;iTEM_ID||column_value||column1||colomn2@@&lt;BR /&gt;@@&lt;BR /&gt;&lt;BR /&gt;1111||aaaa||bbb||ccc@@&lt;BR /&gt;@@&lt;BR /&gt;&lt;BR /&gt;2222||cccc||ddd||eee@@&lt;BR /&gt;@@&lt;BR /&gt;&lt;BR /&gt;@@&lt;BR /&gt;******************************************&lt;BR /&gt;&lt;BR /&gt;Do you see that?&lt;BR /&gt;&lt;BR /&gt;It seems that The shell doesn't recognize "@@\n" as record separator.&lt;BR /&gt;&lt;BR /&gt;On Linux it's more like:&lt;BR /&gt;*******************************************&lt;BR /&gt;$ nawk 'BEGIN{FS="[|][|]";OFS="||";RS="@@\n";ORS="@@\n"}{print $0}' extract_test.dat&lt;BR /&gt;iTEM_ID||column_value||column1||colomn2@@&lt;BR /&gt;1111||aaaa||bbb||ccc@@&lt;BR /&gt;2222||cccc||ddd||eee@@&lt;BR /&gt;*******************************************&lt;BR /&gt;&lt;BR /&gt;Do you have any idea to modify the command so I can have the same result on Solaris as on &lt;BR /&gt;Linux?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Fri, 08 Aug 2008 00:13:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-problem-when-i-define-rs/m-p/4248426#M687446</guid>
      <dc:creator>Wang,MinJie</dc:creator>
      <dc:date>2008-08-08T00:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Some problem when I define RS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-problem-when-i-define-rs/m-p/4248427#M687448</link>
      <description>&amp;gt; It seems that The shell doesn't [...]&lt;BR /&gt;&lt;BR /&gt;The shell or "nawk"?&lt;BR /&gt;&lt;BR /&gt;"nawk" version on each system?  OS version on&lt;BR /&gt;each system?  (The OS version probably&lt;BR /&gt;doesn't matter, except as it might offer a&lt;BR /&gt;clue as to what you're using for "nawk"&lt;BR /&gt;everywhere, in case "nawk" came with one or&lt;BR /&gt;more of the OS's.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Do you have any idea to modify the command&lt;BR /&gt;&amp;gt; so I can have the same result on Solaris as&lt;BR /&gt;&amp;gt; on Linux?&lt;BR /&gt;&lt;BR /&gt;Use the same ("nawk") program on each system,&lt;BR /&gt;and you probably wouldn't need to modify the&lt;BR /&gt;command anywhere?&lt;BR /&gt;&lt;BR /&gt;If I were asking a question like that on an&lt;BR /&gt;HP-UX forum, I'd probably phrase it&lt;BR /&gt;differently.</description>
      <pubDate>Fri, 08 Aug 2008 01:20:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-problem-when-i-define-rs/m-p/4248427#M687448</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-08-08T01:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Some problem when I define RS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-problem-when-i-define-rs/m-p/4248428#M687449</link>
      <description>It seems that GNU awk works the way you want.&lt;BR /&gt;Otherwise, each line seems to be broken into 3 parts, the original and two blank lines.</description>
      <pubDate>Fri, 08 Aug 2008 03:34:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-problem-when-i-define-rs/m-p/4248428#M687449</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-08T03:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Some problem when I define RS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-problem-when-i-define-rs/m-p/4248429#M687450</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;OK, so it seems taht the input can be parsed about and recomposed to produce the same output on some platforms.  Now, what are you really trying to solve?&lt;BR /&gt;&lt;BR /&gt;It seems that 'awk' differs in its behavior on various opearating systems:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.shelldorado.com/articles/awkcompat.html" target="_blank"&gt;http://www.shelldorado.com/articles/awkcompat.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you want a tool that gives highly *consistent* behavior on a large number of platforms, *and* has superior regular expression support: use Perl.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 08 Aug 2008 11:04:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-problem-when-i-define-rs/m-p/4248429#M687450</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-08T11:04:11Z</dc:date>
    </item>
  </channel>
</rss>

