<?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: Comparing Software List in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904446#M404754</link>
    <description>Just forgot to add one line to the script.&lt;BR /&gt;Append the script at the end with:&lt;BR /&gt;&lt;BR /&gt;func1 $list&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;</description>
    <pubDate>Sat, 28 May 2005 15:34:16 GMT</pubDate>
    <dc:creator>Bharat Katkar</dc:creator>
    <dc:date>2005-05-28T15:34:16Z</dc:date>
    <item>
      <title>Comparing Software List</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904443#M404751</link>
      <description>Guys&lt;BR /&gt;&lt;BR /&gt;I have two servers and on both i have run swlist -l patch &amp;gt; /tmp/patches_servera.txt and then the same command but on server b.&lt;BR /&gt;&lt;BR /&gt;What i want to know is the best way with these two text files, the command to know what patches exist in serverb BUT NOT in servera.&lt;BR /&gt;&lt;BR /&gt;I guess it will be diff but no manipultion using the syntaxes gives me what I need!&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 28 May 2005 13:14:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904443#M404751</guid>
      <dc:creator>Mark Treen_1</dc:creator>
      <dc:date>2005-05-28T13:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Software List</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904444#M404752</link>
      <description>I personally do not like the output diff command generates, hence I have this little script to determine what you are looking for&lt;BR /&gt;&lt;BR /&gt;on server a&lt;BR /&gt;swlist -l product | grep PH | awk {'print $1'} &amp;gt; /tmp/patch_serverA&lt;BR /&gt;&lt;BR /&gt;on server b&lt;BR /&gt;swlist -l product | grep PH | awk {'print $1'} &amp;gt; /tmp/patch_serverB&lt;BR /&gt;&lt;BR /&gt;combine two files into the same place by ftp or your favorite way of file transfer.&lt;BR /&gt;&lt;BR /&gt;then&lt;BR /&gt;&lt;BR /&gt;for patch in `cat patch_serverB`&lt;BR /&gt;do&lt;BR /&gt;grep -q ${patch) patch_serverA; r=${?}&lt;BR /&gt;if [ $r -ne 0 ]&lt;BR /&gt;then&lt;BR /&gt;echo ${patch} &amp;gt;&amp;gt; /tmp/patches_not_on_serverA&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;when this finishes running, you will have the output you wish in the file /tmp/patches_not_on_serverA&lt;BR /&gt;&lt;BR /&gt;Hope this helps</description>
      <pubDate>Sat, 28 May 2005 14:27:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904444#M404752</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-05-28T14:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Software List</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904445#M404753</link>
      <description>Hi Mark,&lt;BR /&gt;One small script&lt;BR /&gt;Before executing the script make sure you create file file1 which contains patch information of serverB.&lt;BR /&gt;# swlist -l patch &amp;gt; file1&lt;BR /&gt;ftp file1 to serverA.&lt;BR /&gt;Execute following script on serverA&lt;BR /&gt;&lt;BR /&gt;Script::&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;list=`swlist -l patch | grep  PH| awk '{ print $1 }' | grep -v "#"`&lt;BR /&gt;func1()&lt;BR /&gt;{&lt;BR /&gt;var1=$#&lt;BR /&gt;while true &lt;BR /&gt;do&lt;BR /&gt;if [ $var1 -gt 0 ]&lt;BR /&gt;then &lt;BR /&gt;   result=`cat file1 | grep $1 | wc -l`&lt;BR /&gt;   if [ $result -eq 0 ]&lt;BR /&gt;   then &lt;BR /&gt;   echo " Patch $1 does not exists "&lt;BR /&gt;   fi&lt;BR /&gt;   let var1=var1-1&lt;BR /&gt;   shift 1&lt;BR /&gt;else&lt;BR /&gt;    exit&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Script Ends:: &lt;BR /&gt;&lt;BR /&gt;Now this will tell you what patches those are present on Server are not on ServerB.&lt;BR /&gt;&lt;BR /&gt;Do vice versa also i.e. create file1 for ServerA and execute the script on ServerB.&lt;BR /&gt;&lt;BR /&gt;Picture should be quite clear.&lt;BR /&gt;&lt;BR /&gt;Hope that helps.&lt;BR /&gt;Regards,</description>
      <pubDate>Sat, 28 May 2005 15:31:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904445#M404753</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2005-05-28T15:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Software List</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904446#M404754</link>
      <description>Just forgot to add one line to the script.&lt;BR /&gt;Append the script at the end with:&lt;BR /&gt;&lt;BR /&gt;func1 $list&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;</description>
      <pubDate>Sat, 28 May 2005 15:34:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904446#M404754</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2005-05-28T15:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Software List</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904447#M404755</link>
      <description>Hi Mark,&lt;BR /&gt;&lt;BR /&gt;       Use "comm" command. Check its man pages for options.&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Sat, 28 May 2005 15:36:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904447#M404755</guid>
      <dc:creator>Senthil Kumar .A_1</dc:creator>
      <dc:date>2005-05-28T15:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Software List</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904448#M404756</link>
      <description>Hi mark,&lt;BR /&gt;&lt;BR /&gt;    for your present scenario...&lt;BR /&gt;&lt;BR /&gt;Type these command sequence in your terminal..&lt;BR /&gt;&lt;BR /&gt;sort /tmp/patches_servera.txt &amp;gt; /tmp/sorted_patches_servera.txt &lt;BR /&gt;sort /tmp/patches_serverb.txt &amp;gt; /tmp/sorted_patches_serverb.txt &lt;BR /&gt;echo "patches only found in SERVER - A" &lt;BR /&gt;comm -23 /tmp/sorted_patches_servera.txt /tmp/sorted_patches_serverb.txt&lt;BR /&gt;echo "patches only found in SERVER - B" &lt;BR /&gt;comm -13 /tmp/sorted_patches_servera.txt /tmp/sorted_patches_serverb.txt&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;&lt;BR /&gt;PS: if you want to know the common patches use &lt;BR /&gt;comm -12 /tmp/sorted_patches_servera.txt /tmp/sorted_patches_serverb.txt&lt;BR /&gt;&lt;BR /&gt;and if you want all the details is single shot , then use comm file1 file2 ,this will give you three columned output. &lt;BR /&gt;1st column : entries unique to file1&lt;BR /&gt;2nd column : entries unique to file2&lt;BR /&gt;3rd column : entries common in file1 and file2.&lt;BR /&gt; &lt;BR /&gt;Note: need to sort both the files before you feed it to "comm" command.&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;</description>
      <pubDate>Sat, 28 May 2005 16:01:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904448#M404756</guid>
      <dc:creator>Senthil Kumar .A_1</dc:creator>
      <dc:date>2005-05-28T16:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Software List</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904449#M404757</link>
      <description>Hi mark,&lt;BR /&gt;&lt;BR /&gt;  sorry to make my reply into three pieces...&lt;BR /&gt;&lt;BR /&gt;i forgot about one other thing..&lt;BR /&gt;&lt;BR /&gt;before proceeding with the steps put in my previous reply... please make sure the files are created using following command&lt;BR /&gt;&lt;BR /&gt;in SERVER A&lt;BR /&gt;swlist -l product | grep PH | awk '{print $1}' &amp;gt; /tmp/patches_servera.txt&lt;BR /&gt;&lt;BR /&gt;in SERVER B&lt;BR /&gt;swlist -l product | grep PH | awk '{print $1}' &amp;gt; /tmp/patches_serverb.txt&lt;BR /&gt;&lt;BR /&gt;Sorry  Mel Burslan : had to borrow one of your lines... &lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;</description>
      <pubDate>Sat, 28 May 2005 17:32:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904449#M404757</guid>
      <dc:creator>Senthil Kumar .A_1</dc:creator>
      <dc:date>2005-05-28T17:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Software List</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904450#M404758</link>
      <description>Thanks for the advice</description>
      <pubDate>Sun, 29 May 2005 11:11:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-software-list/m-p/4904450#M404758</guid>
      <dc:creator>Mark Treen_1</dc:creator>
      <dc:date>2005-05-29T11:11:45Z</dc:date>
    </item>
  </channel>
</rss>

