<?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 or other command help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227948#M679608</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;This might be as simple as :&lt;BR /&gt;&lt;BR /&gt;# awk '/JRA/ &amp;amp;&amp;amp; /^JRA_W:/' {print FILENAME":",$0}' /tmp/type/*/group&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Wed, 03 Mar 2010 19:05:56 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2010-03-03T19:05:56Z</dc:date>
    <item>
      <title>awk or other command help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227947#M679607</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I am trying to figure out if a user is part of a group or not for many servers. I have a repository of the servers at a central location /tmp/type/*/group.&lt;BR /&gt;&lt;BR /&gt;Where type is variable and * are hundres of servers i.e. /tmp/servers/JRA/*/group. &lt;BR /&gt;&lt;BR /&gt;I want to check if ID JRA is a part of group JRA_W on all of these servers. Can someone help me with a single command to achieve this.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Wed, 03 Mar 2010 18:57:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227947#M679607</guid>
      <dc:creator>rhansen</dc:creator>
      <dc:date>2010-03-03T18:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: awk or other command help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227948#M679608</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;This might be as simple as :&lt;BR /&gt;&lt;BR /&gt;# awk '/JRA/ &amp;amp;&amp;amp; /^JRA_W:/' {print FILENAME":",$0}' /tmp/type/*/group&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 03 Mar 2010 19:05:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227948#M679608</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-03T19:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: awk or other command help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227949#M679609</link>
      <description># awk '/JRA/ &amp;amp;&amp;amp; /^JRA_W:/' {print FILENAME":",$0}' /tmp/type/*/group&lt;BR /&gt; When I try this it gets me a &lt;BR /&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;What does the FILENAME does in the code.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 03 Mar 2010 19:13:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227949#M679609</guid>
      <dc:creator>rhansen</dc:creator>
      <dc:date>2010-03-03T19:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: awk or other command help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227950#M679610</link>
      <description>There is one to many ' in the command.  Try this:&lt;BR /&gt;&lt;BR /&gt;awk '/JRA/ &amp;amp;&amp;amp; /^JRA_W:/ {print FILENAME":",$0}' /tmp/type/*/group</description>
      <pubDate>Wed, 03 Mar 2010 19:25:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227950#M679610</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2010-03-03T19:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: awk or other command help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227951#M679611</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Sorry a typo.  The command should be:&lt;BR /&gt;&lt;BR /&gt;# awk '/JRA/ &amp;amp;&amp;amp; /^JRA_W:/ {print FILENAME":",$0}' /tmp/type/*/group&lt;BR /&gt;&lt;BR /&gt;The 'FILENAME' is 'awk's current file name being processed.  This adds the name of the file that has matching criteria to the output followed by a colon and the line that matched.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Mar 2010 19:29:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227951#M679611</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-03T19:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: awk or other command help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227952#M679612</link>
      <description>Thanks James and Patrick for the help. The command gets me the output but not what I desire. Sorry, I may not have been clear enough.&lt;BR /&gt;&lt;BR /&gt;I only need to find the servers where JRA ID is not a part of JRA_W group so that I can add it to the group. This currently gives me everything.</description>
      <pubDate>Wed, 03 Mar 2010 19:34:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227952#M679612</guid>
      <dc:creator>rhansen</dc:creator>
      <dc:date>2010-03-03T19:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: awk or other command help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227953#M679613</link>
      <description>OK, try this then:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;awk '!/JRA/ &amp;amp;&amp;amp; /^JRA_W:/ {print FILENAME":",$0}' /tmp/type/*/group&lt;BR /&gt;&lt;BR /&gt;This should give you the files where JRA is NOT part of JRA_W.</description>
      <pubDate>Wed, 03 Mar 2010 19:39:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227953#M679613</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2010-03-03T19:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: awk or other command help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227954#M679614</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I only need to find the servers where JRA ID is not a part of JRA_W group so that I can add it to the group. This currently gives me everything.&lt;BR /&gt;&lt;BR /&gt;Then:&lt;BR /&gt;&lt;BR /&gt;# awk '/^JRA_W:/ &amp;amp;&amp;amp; !/JRA/ {print FILENAME}' /tmp/type/*/group | sort -u&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 03 Mar 2010 19:44:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227954#M679614</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-03T19:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: awk or other command help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227955#M679615</link>
      <description>Thanks James, that worked perfectly.</description>
      <pubDate>Wed, 03 Mar 2010 19:52:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-or-other-command-help/m-p/5227955#M679615</guid>
      <dc:creator>rhansen</dc:creator>
      <dc:date>2010-03-03T19:52:28Z</dc:date>
    </item>
  </channel>
</rss>

