<?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 shell script or commands in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392758#M681689</link>
    <description>To get only REQUIRED from the file test1 into newfile do:&lt;BR /&gt;&lt;BR /&gt;grep -v -f test2 test1 &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;What this does:&lt;BR /&gt;&lt;BR /&gt;-v - output non-matching strings&lt;BR /&gt;-f test2 - use the patterns in this file&lt;BR /&gt;&lt;BR /&gt;See the grep man page for more information.</description>
    <pubDate>Wed, 01 Apr 2009 18:41:44 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2009-04-01T18:41:44Z</dc:date>
    <item>
      <title>some shell script or commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392756#M681687</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;We have a text file "test1" containing both "required" and "un-required" server listing.&lt;BR /&gt;We created another text file "test2" from above containing only "un-required" server listing.&lt;BR /&gt;&lt;BR /&gt;This test1 is a large file containing hundreds of server names listing.&lt;BR /&gt;&lt;BR /&gt;Now i want to remove un-required servers from file test1. &lt;BR /&gt;&lt;BR /&gt;Can anyone suggest some quick way to do it ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv</description>
      <pubDate>Wed, 01 Apr 2009 18:18:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392756#M681687</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2009-04-01T18:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: some shell script or commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392757#M681688</link>
      <description>If your test1 containing both required and un-reguired shows something like this:&lt;BR /&gt;&lt;BR /&gt;required    server1&lt;BR /&gt;un-required serverabc&lt;BR /&gt;required    serverxxx&lt;BR /&gt;un-required node123&lt;BR /&gt;&lt;BR /&gt;Then you could:&lt;BR /&gt;&lt;BR /&gt;cat test1 | grep -v "un-required" &amp;gt; test.new&lt;BR /&gt;&lt;BR /&gt;Just a very very quick thought,&lt;BR /&gt;Rita</description>
      <pubDate>Wed, 01 Apr 2009 18:23:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392757#M681688</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2009-04-01T18:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: some shell script or commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392758#M681689</link>
      <description>To get only REQUIRED from the file test1 into newfile do:&lt;BR /&gt;&lt;BR /&gt;grep -v -f test2 test1 &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;What this does:&lt;BR /&gt;&lt;BR /&gt;-v - output non-matching strings&lt;BR /&gt;-f test2 - use the patterns in this file&lt;BR /&gt;&lt;BR /&gt;See the grep man page for more information.</description>
      <pubDate>Wed, 01 Apr 2009 18:41:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392758#M681689</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-04-01T18:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: some shell script or commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392759#M681690</link>
      <description>HI,&lt;BR /&gt;See the example below&lt;BR /&gt;&lt;BR /&gt;[suraj@rspc521 tmp]# cat srvlist&lt;BR /&gt;server1&lt;BR /&gt;server2&lt;BR /&gt;server3&lt;BR /&gt;server4&lt;BR /&gt;server5&lt;BR /&gt;server6&lt;BR /&gt;server7&lt;BR /&gt;server8&lt;BR /&gt;server9&lt;BR /&gt;&lt;BR /&gt;[suraj@rspc521 tmp]# cat unreqlist&lt;BR /&gt;server2&lt;BR /&gt;server3&lt;BR /&gt;server5&lt;BR /&gt;server8&lt;BR /&gt;server9&lt;BR /&gt;&lt;BR /&gt;[suraj@rspc521 tmp]# diff srvlist unreclist&lt;BR /&gt;1d0&lt;BR /&gt;&amp;lt; server1&lt;BR /&gt;4d2&lt;BR /&gt;&amp;lt; server4&lt;BR /&gt;6,7d3&lt;BR /&gt;&amp;lt; server6&lt;BR /&gt;&amp;lt; server7&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The output is your required servers list.&lt;BR /&gt;&lt;BR /&gt;Suraj&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Apr 2009 03:24:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392759#M681690</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-04-02T03:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: some shell script or commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392760#M681691</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;it depends upon how the text is in the file to a certain extent?&lt;BR /&gt;&lt;BR /&gt;if for example you have them organised into columns of data, and all the un-required ones are in one or two coloumns then this could be achieved by something like this&lt;BR /&gt;&lt;BR /&gt;example test file&lt;BR /&gt;&lt;BR /&gt;required unrequired sorted&lt;BR /&gt;&lt;BR /&gt;server1  server2  server5&lt;BR /&gt;server3  server4  server7&lt;BR /&gt;&lt;BR /&gt;then we could extract the other two columns of data into another file&lt;BR /&gt;&lt;BR /&gt;#awk '{print $1,$3,}' test &amp;gt; test3&lt;BR /&gt;&lt;BR /&gt;Andy&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Apr 2009 11:32:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392760#M681691</guid>
      <dc:creator>Andrew Rutter</dc:creator>
      <dc:date>2009-04-02T11:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: some shell script or commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392761#M681692</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;Your file formats would help provide an appropriate solution.&lt;BR /&gt;&lt;BR /&gt;If the files are sorted, and, for example, look like:&lt;BR /&gt;&lt;BR /&gt;# cat file1&lt;BR /&gt;server1&lt;BR /&gt;server2&lt;BR /&gt;server3&lt;BR /&gt;server4&lt;BR /&gt;server5&lt;BR /&gt;server6&lt;BR /&gt;&lt;BR /&gt;# cat file2&lt;BR /&gt;server2&lt;BR /&gt;server4&lt;BR /&gt;server6&lt;BR /&gt;&lt;BR /&gt;...then:&lt;BR /&gt;&lt;BR /&gt;# comm -23 file1 file2&lt;BR /&gt;server1&lt;BR /&gt;server3&lt;BR /&gt;server5&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 02 Apr 2009 11:46:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-shell-script-or-commands/m-p/4392761#M681692</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-04-02T11:46:15Z</dc:date>
    </item>
  </channel>
</rss>

