<?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 Installed patch verification script -- Have fun! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/installed-patch-verification-script-have-fun/m-p/2694433#M56289</link>
    <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Here is a simple script in perl to check for install patches.&lt;BR /&gt;&lt;BR /&gt;Put your list of patches in patch.list eg: PHSS_XXXXX&lt;BR /&gt;PHCO_XXXXX&lt;BR /&gt;&lt;BR /&gt;Be sure to modify the location of the .list files in the script.&lt;BR /&gt;&lt;BR /&gt;Run the script and it will generate a file result.list that will tell you if the patches are installed or not.&lt;BR /&gt;&lt;BR /&gt;Hope that this helps to make everyones day a little easier :-)&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;################################################################################ &lt;BR /&gt;#  Name:        patchck.pl&lt;BR /&gt;#  Description: Check a list of patches supplied from file patch.list&lt;BR /&gt;#  Author:      Craig A. Sharp&lt;BR /&gt;#  Syntax:      patchck&lt;BR /&gt;#  Options:     None&lt;BR /&gt;#  Version:     1.0.0&lt;BR /&gt;#  Date:        11/15/2001&lt;BR /&gt;################################################################################ &lt;BR /&gt;# Change Log:&lt;BR /&gt;# Date       Programmer      Description&lt;BR /&gt;# ---------- --------------- -------------------------------------------------&lt;BR /&gt;################################################################################&lt;BR /&gt;&lt;BR /&gt;$patchfile = "/home/admin/patch_check/patch.list";&lt;BR /&gt;$results = "&amp;gt;/home/admin/patch_check/result.list";&lt;BR /&gt;&lt;BR /&gt;open (listfile, $patchfile) || die "$!";&lt;BR /&gt;open (resultfile, $results) || warn "$!";&lt;BR /&gt;&lt;BR /&gt;@patchlist = &lt;LISTFILE&gt;;&lt;BR /&gt;&lt;BR /&gt;foreach $patch (@patchlist) {&lt;BR /&gt;&lt;BR /&gt;  chomp ($patch);&lt;BR /&gt;&lt;BR /&gt;  print "-----------------------------------------------------------\n";&lt;BR /&gt;  print "Checking for patch $patch....\n";&lt;BR /&gt;  print "\n";&lt;BR /&gt;&lt;BR /&gt;    unless (!system "swlist -l patch | grep $patch") {&lt;BR /&gt;       print resultfile "Patch $patch is not installed.\n";&lt;BR /&gt;    }&lt;BR /&gt;    else {&lt;BR /&gt;       print resultfile "Patch $patch is installed.\n";&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;  print "\n";&lt;BR /&gt;  print "-----------------------------------------------------------\n";&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;close listfile;&lt;BR /&gt;close resultfile;&lt;BR /&gt;&lt;BR /&gt;Craig&lt;/LISTFILE&gt;</description>
    <pubDate>Mon, 01 Apr 2002 14:55:18 GMT</pubDate>
    <dc:creator>Craig A. Sharp</dc:creator>
    <dc:date>2002-04-01T14:55:18Z</dc:date>
    <item>
      <title>Installed patch verification script -- Have fun!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/installed-patch-verification-script-have-fun/m-p/2694433#M56289</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Here is a simple script in perl to check for install patches.&lt;BR /&gt;&lt;BR /&gt;Put your list of patches in patch.list eg: PHSS_XXXXX&lt;BR /&gt;PHCO_XXXXX&lt;BR /&gt;&lt;BR /&gt;Be sure to modify the location of the .list files in the script.&lt;BR /&gt;&lt;BR /&gt;Run the script and it will generate a file result.list that will tell you if the patches are installed or not.&lt;BR /&gt;&lt;BR /&gt;Hope that this helps to make everyones day a little easier :-)&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;################################################################################ &lt;BR /&gt;#  Name:        patchck.pl&lt;BR /&gt;#  Description: Check a list of patches supplied from file patch.list&lt;BR /&gt;#  Author:      Craig A. Sharp&lt;BR /&gt;#  Syntax:      patchck&lt;BR /&gt;#  Options:     None&lt;BR /&gt;#  Version:     1.0.0&lt;BR /&gt;#  Date:        11/15/2001&lt;BR /&gt;################################################################################ &lt;BR /&gt;# Change Log:&lt;BR /&gt;# Date       Programmer      Description&lt;BR /&gt;# ---------- --------------- -------------------------------------------------&lt;BR /&gt;################################################################################&lt;BR /&gt;&lt;BR /&gt;$patchfile = "/home/admin/patch_check/patch.list";&lt;BR /&gt;$results = "&amp;gt;/home/admin/patch_check/result.list";&lt;BR /&gt;&lt;BR /&gt;open (listfile, $patchfile) || die "$!";&lt;BR /&gt;open (resultfile, $results) || warn "$!";&lt;BR /&gt;&lt;BR /&gt;@patchlist = &lt;LISTFILE&gt;;&lt;BR /&gt;&lt;BR /&gt;foreach $patch (@patchlist) {&lt;BR /&gt;&lt;BR /&gt;  chomp ($patch);&lt;BR /&gt;&lt;BR /&gt;  print "-----------------------------------------------------------\n";&lt;BR /&gt;  print "Checking for patch $patch....\n";&lt;BR /&gt;  print "\n";&lt;BR /&gt;&lt;BR /&gt;    unless (!system "swlist -l patch | grep $patch") {&lt;BR /&gt;       print resultfile "Patch $patch is not installed.\n";&lt;BR /&gt;    }&lt;BR /&gt;    else {&lt;BR /&gt;       print resultfile "Patch $patch is installed.\n";&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;  print "\n";&lt;BR /&gt;  print "-----------------------------------------------------------\n";&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;close listfile;&lt;BR /&gt;close resultfile;&lt;BR /&gt;&lt;BR /&gt;Craig&lt;/LISTFILE&gt;</description>
      <pubDate>Mon, 01 Apr 2002 14:55:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/installed-patch-verification-script-have-fun/m-p/2694433#M56289</guid>
      <dc:creator>Craig A. Sharp</dc:creator>
      <dc:date>2002-04-01T14:55:18Z</dc:date>
    </item>
  </channel>
</rss>

