<?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: awk - single character field separator in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527899#M701384</link>
    <description>I don't think you can in hpux.&lt;BR /&gt;&lt;BR /&gt;In Linux you could also do &lt;BR /&gt;&lt;BR /&gt;echo hello | awk -F "" '{print $1}'&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 19 Apr 2005 10:55:41 GMT</pubDate>
    <dc:creator>Stephen Keane</dc:creator>
    <dc:date>2005-04-19T10:55:41Z</dc:date>
    <item>
      <title>awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527895#M701380</link>
      <description>How do I assign a field separator of any single character in awk?  The following works fine (prints an 'h') in Linux but not in HP-UX:&lt;BR /&gt;echo hello | awk 'BEGIN { FS = "" } ; {print $1}</description>
      <pubDate>Tue, 19 Apr 2005 10:14:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527895#M701380</guid>
      <dc:creator>Mark Tunnell</dc:creator>
      <dc:date>2005-04-19T10:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527896#M701381</link>
      <description>hpux awk is not gnu, and therefore has different options and features.&lt;BR /&gt;&lt;BR /&gt;From the gnu website:&lt;BR /&gt;&lt;BR /&gt;Traditionally, the behavior of FS equal to "" was not defined. In this case, most versions of Unix awk simply treat the entire record as only having one field. (d.c.)&lt;BR /&gt;&lt;BR /&gt;-P</description>
      <pubDate>Tue, 19 Apr 2005 10:47:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527896#M701381</guid>
      <dc:creator>Paul Cross_1</dc:creator>
      <dc:date>2005-04-19T10:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527897#M701382</link>
      <description>Thanks for responding.  I gave the Linux example so it would be clear what I was trying to do.  Do you know what the corresponding HP-UX syntax would be?</description>
      <pubDate>Tue, 19 Apr 2005 10:51:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527897#M701382</guid>
      <dc:creator>Mark Tunnell</dc:creator>
      <dc:date>2005-04-19T10:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527898#M701383</link>
      <description>None. &lt;BR /&gt;&lt;BR /&gt;/root# echo hello | awk 'BEGIN { FS="" } ; {print $1}'  &lt;BR /&gt;hello&lt;BR /&gt;&lt;BR /&gt;download and install gawk + libiconv from&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Gnu/gawk-3.1.4/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Gnu/gawk-3.1.4/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Tue, 19 Apr 2005 10:54:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527898#M701383</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2005-04-19T10:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527899#M701384</link>
      <description>I don't think you can in hpux.&lt;BR /&gt;&lt;BR /&gt;In Linux you could also do &lt;BR /&gt;&lt;BR /&gt;echo hello | awk -F "" '{print $1}'&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2005 10:55:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527899#M701384</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-04-19T10:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527900#M701385</link>
      <description>awk -F":"</description>
      <pubDate>Tue, 19 Apr 2005 10:57:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527900#M701385</guid>
      <dc:creator>S.Rider</dc:creator>
      <dc:date>2005-04-19T10:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527901#M701386</link>
      <description>Or,&lt;BR /&gt;&lt;BR /&gt;echo hello | awk 'BEGIN {FIELDWIDTHS=1} { print $1 }'&lt;BR /&gt;&lt;BR /&gt;But sadly, this doesn't help with your problem, as the output on HP is 'hello'.</description>
      <pubDate>Tue, 19 Apr 2005 10:59:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527901#M701386</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-04-19T10:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527902#M701387</link>
      <description>Are other options available? &lt;BR /&gt;&lt;BR /&gt;Could you use the substr() function within perl or shell?&lt;BR /&gt;&lt;BR /&gt;What about sed?</description>
      <pubDate>Tue, 19 Apr 2005 11:06:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527902#M701387</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-04-19T11:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527903#M701388</link>
      <description>Mark,&lt;BR /&gt;I understood your request. I included the clip from the gnu site to try to explain that this is a feature of GNU only, and that UNIX awk doesn't let you do it. Sorry if that wasn't clear.&lt;BR /&gt;&lt;BR /&gt;-paul</description>
      <pubDate>Tue, 19 Apr 2005 11:18:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527903#M701388</guid>
      <dc:creator>Paul Cross_1</dc:creator>
      <dc:date>2005-04-19T11:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527904#M701389</link>
      <description>Thanks for all the responses.  I'll go ahead and user perl for this.</description>
      <pubDate>Tue, 19 Apr 2005 11:20:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527904#M701389</guid>
      <dc:creator>Mark Tunnell</dc:creator>
      <dc:date>2005-04-19T11:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527905#M701390</link>
      <description>&lt;BR /&gt;Here you go:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;echo hello | awk '{gsub("(.)","&amp;amp; " );print $1;}'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The POWER of regex's!!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Tue, 19 Apr 2005 12:33:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527905#M701390</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-04-19T12:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527906#M701391</link>
      <description>or&lt;BR /&gt;&lt;BR /&gt; echo hello | sed "s/\(.\)/&amp;amp; /g" | awk '{printf("f1(%s) f2(%s) f3(%s) f4(%s) f5(%s)\n",$1,$2,$3,$4,$5);}&lt;BR /&gt;&lt;BR /&gt;f1(h) f2(e) f3(l) f4(l) f5(o)&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;echo hello | sed "s/\(.\)/&amp;amp; /g" | awk '{print $5,$4,$3,$2,$1;}'&lt;BR /&gt;&lt;BR /&gt;o l l e h&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Tue, 19 Apr 2005 12:42:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527906#M701391</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-04-19T12:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527907#M701392</link>
      <description>Wow!  Thanks!</description>
      <pubDate>Tue, 19 Apr 2005 12:53:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527907#M701392</guid>
      <dc:creator>Mark Tunnell</dc:creator>
      <dc:date>2005-04-19T12:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527908#M701393</link>
      <description>Why to complicate&lt;BR /&gt;We can simply use:&lt;BR /&gt;&lt;BR /&gt;echo hello | sed "s/./&amp;amp; /g" | awk '{print $5,$4,$3,$2,$1;}'&lt;BR /&gt;&lt;BR /&gt;I know we can use any general os command in awk block, but somehow i am unable to figure out how.&lt;BR /&gt;Can someone help me start it out.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 20 Apr 2005 01:51:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527908#M701393</guid>
      <dc:creator>Vibhor Kumar Agarwal</dc:creator>
      <dc:date>2005-04-20T01:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: awk - single character field separator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527909#M701394</link>
      <description>lt09:/home/merijn 110 &amp;gt; echo hello | perl -lne'$,=" ";print split//'&lt;BR /&gt;h e l l o&lt;BR /&gt;lt09:/home/merijn 111 &amp;gt; echo hello | perl -lne'$,=" ";print reverse split//'&lt;BR /&gt;o l l e h&lt;BR /&gt;lt09:/home/merijn 112 &amp;gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Wed, 20 Apr 2005 02:11:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-single-character-field-separator/m-p/3527909#M701394</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-20T02:11:22Z</dc:date>
    </item>
  </channel>
</rss>

