<?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: Scripting Challenge in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448142#M10041</link>
    <description>James,&lt;BR /&gt;&lt;BR /&gt;I get an awk syntax error on the second command line you provided.&lt;BR /&gt;awk: The statement cannot be correctly parsed. The source line is 1. syntax error The source is line 1.&lt;BR /&gt;&lt;BR /&gt;Fred,&lt;BR /&gt;I keep getting "invalid mode o+W-o" or variants of that when adding spaces between them.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!</description>
    <pubDate>Wed, 27 Sep 2000 11:08:05 GMT</pubDate>
    <dc:creator>Robert Gamble</dc:creator>
    <dc:date>2000-09-27T11:08:05Z</dc:date>
    <item>
      <title>Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448135#M10034</link>
      <description>A security audit is coming a I have a request coming from my customer to print to a file a list of EVERY file that is world readable and world writable (-zzzzzzzrwz, where z doesnt matter). Yes, I realize this will create a huge file.&lt;BR /&gt;I considered using a 'lsr -la &amp;gt; $FILE' but I'm not sure how to grep for just the 8th and 9th character.  If I use 'cut' it strips away the rest of the output of the lsr command which is needed.&lt;BR /&gt;&lt;BR /&gt;The output needs to have the $PATH/$FILENAME and permissions for each file that is world read/write. &lt;BR /&gt;&lt;BR /&gt;Any Ideas ?&lt;BR /&gt;T.I.A.</description>
      <pubDate>Tue, 26 Sep 2000 19:47:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448135#M10034</guid>
      <dc:creator>Robert Gamble</dc:creator>
      <dc:date>2000-09-26T19:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448136#M10035</link>
      <description>Robert:&lt;BR /&gt;&lt;BR /&gt;# ls -al|awk '{if (substr($1,8,2)=="rw") {print $0}}' &amp;gt; /tmp/results&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 26 Sep 2000 20:05:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448136#M10035</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-09-26T20:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448137#M10036</link>
      <description>not just 'rw' but '-w', 'r-'&lt;BR /&gt;&lt;BR /&gt;thx</description>
      <pubDate>Tue, 26 Sep 2000 21:40:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448137#M10036</guid>
      <dc:creator>Robert Gamble</dc:creator>
      <dc:date>2000-09-26T21:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448138#M10037</link>
      <description>Robert:&lt;BR /&gt;&lt;BR /&gt;# ls -al|awk '{if(substr($1,8,1)=="r")||(substr($1,9,1)=="w") {print $0}}' &amp;gt; /tmp/results&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Sep 2000 22:27:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448138#M10037</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-09-26T22:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448139#M10038</link>
      <description>I think the 'find' command would do:&lt;BR /&gt;&lt;BR /&gt; find //wherever -perm -o+w -o -perm -o+r&lt;BR /&gt;       -exec ls -la {} ; &lt;BR /&gt;&lt;BR /&gt;A little hard to read but it says "find in directory //wherever, files with permissions of "other" as writable OR files with permissions of "other" as readable - then perform an 'ls -ls' on each file found.&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Sep 2000 23:05:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448139#M10038</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2000-09-26T23:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448140#M10039</link>
      <description>I think the 'find' command would do:&lt;BR /&gt;&lt;BR /&gt; find //wherever -perm -o+w -o -perm -o+r&lt;BR /&gt;       -exec ls -la {} ; &lt;BR /&gt;&lt;BR /&gt;A little hard to read but it says "find in directory //wherever, files with permissions of "other" as writable OR files with permissions of "other" as readable - then perform an 'ls -ls' on each file found.&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Sep 2000 23:06:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448140#M10039</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2000-09-26T23:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448141#M10040</link>
      <description>Sorry about the double slashes above.  That should read:&lt;BR /&gt;&lt;BR /&gt; find /wherever  -perm  -o+w  -o  -perm  -o+r&lt;BR /&gt;       -exec  ls  -la  {}\; &lt;BR /&gt;</description>
      <pubDate>Tue, 26 Sep 2000 23:07:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448141#M10040</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2000-09-26T23:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448142#M10041</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;I get an awk syntax error on the second command line you provided.&lt;BR /&gt;awk: The statement cannot be correctly parsed. The source line is 1. syntax error The source is line 1.&lt;BR /&gt;&lt;BR /&gt;Fred,&lt;BR /&gt;I keep getting "invalid mode o+W-o" or variants of that when adding spaces between them.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!</description>
      <pubDate>Wed, 27 Sep 2000 11:08:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448142#M10041</guid>
      <dc:creator>Robert Gamble</dc:creator>
      <dc:date>2000-09-27T11:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448143#M10042</link>
      <description>put the condition between "("  ")" like this &lt;BR /&gt;&lt;BR /&gt;ls -al|awk '{ifi((substr($1,8,1)=="r")||(substr($1,9,1)=="w")) {print $0}}' &amp;gt; /tmp/results &lt;BR /&gt;&lt;BR /&gt;federico&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Sep 2000 11:15:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448143#M10042</guid>
      <dc:creator>federico_3</dc:creator>
      <dc:date>2000-09-27T11:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448144#M10043</link>
      <description>Robert:&lt;BR /&gt;&lt;BR /&gt;Sorry, been off-line. The syntax should be:&lt;BR /&gt;&lt;BR /&gt;ls -al|awk '{if((substr($1,8,1)=="r")||(substr($1,9,1)=="w")) {print $0}}' &amp;gt; /tmp/results&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 27 Sep 2000 11:27:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448144#M10043</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-09-27T11:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448145#M10044</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;That works! Thank you very much!</description>
      <pubDate>Wed, 27 Sep 2000 11:31:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448145#M10044</guid>
      <dc:creator>Robert Gamble</dc:creator>
      <dc:date>2000-09-27T11:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448146#M10045</link>
      <description>The spaces are important.  If this is clearer, consider the underscores below as spaces and try it again:&lt;BR /&gt;&lt;BR /&gt;find_/wherever_-perm_-o+w_-o_-perm_-o+r_-exec_ls_-al_{}_\;&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Sep 2000 18:56:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448146#M10045</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2000-09-27T18:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Challenge</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448147#M10046</link>
      <description>find / -xdev -type f -perm -006 -exec ls -ld {} ; &amp;gt; /tmp/rw.lst&lt;BR /&gt;   Run it as a user instead of root, so you dont get into any directories that a user cant read anyways.&lt;BR /&gt;   If you just need filenames, drop the -exec&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Sep 2000 05:06:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-challenge/m-p/2448147#M10046</guid>
      <dc:creator>unix team_4</dc:creator>
      <dc:date>2000-09-28T05:06:53Z</dc:date>
    </item>
  </channel>
</rss>

