<?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: replacement string in awk in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/replacement-string-in-awk/m-p/2993512#M718465</link>
    <description>the \n notation where \n matches the nth pattern previously saved by "\(" and "\)" is from the unix command sed, not from awk&lt;BR /&gt;&lt;BR /&gt;for awk you'd do something like this:&lt;BR /&gt;&lt;BR /&gt;a=abc&lt;BR /&gt;b=def&lt;BR /&gt;print "$a $b" |&lt;BR /&gt;awk '{&lt;BR /&gt;sub($1,$2);&lt;BR /&gt;print $1;&lt;BR /&gt;}'&lt;BR /&gt;&lt;BR /&gt;with awk each input line forms a record containing any number of fields.  each field can be referenced by its position in the record.  $1 refers to the value of the first field; $2 to the second field, and so on.  $0 refers to the entire record.</description>
    <pubDate>Tue, 10 Jun 2003 16:02:07 GMT</pubDate>
    <dc:creator>curt larson_1</dc:creator>
    <dc:date>2003-06-10T16:02:07Z</dc:date>
    <item>
      <title>replacement string in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replacement-string-in-awk/m-p/2993511#M718464</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Do the substitution strings as \n  work in sub() and gsub() awk  functions ?&lt;BR /&gt;&lt;BR /&gt;$ echo "A B" | awk '{ sub("A","\\1"); print }'&lt;BR /&gt;\1 B&lt;BR /&gt;&lt;BR /&gt;P.D: '&amp;amp;' works fine</description>
      <pubDate>Tue, 10 Jun 2003 14:05:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replacement-string-in-awk/m-p/2993511#M718464</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2003-06-10T14:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: replacement string in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replacement-string-in-awk/m-p/2993512#M718465</link>
      <description>the \n notation where \n matches the nth pattern previously saved by "\(" and "\)" is from the unix command sed, not from awk&lt;BR /&gt;&lt;BR /&gt;for awk you'd do something like this:&lt;BR /&gt;&lt;BR /&gt;a=abc&lt;BR /&gt;b=def&lt;BR /&gt;print "$a $b" |&lt;BR /&gt;awk '{&lt;BR /&gt;sub($1,$2);&lt;BR /&gt;print $1;&lt;BR /&gt;}'&lt;BR /&gt;&lt;BR /&gt;with awk each input line forms a record containing any number of fields.  each field can be referenced by its position in the record.  $1 refers to the value of the first field; $2 to the second field, and so on.  $0 refers to the entire record.</description>
      <pubDate>Tue, 10 Jun 2003 16:02:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replacement-string-in-awk/m-p/2993512#M718465</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2003-06-10T16:02:07Z</dc:date>
    </item>
  </channel>
</rss>

