GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Installed patch verification script -- Have fun!
Operating System - HP-UX
1851753
Members
1899
Online
104062
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2002 06:55 AM
04-01-2002 06:55 AM
Installed patch verification script -- Have fun!
Hi all,
Here is a simple script in perl to check for install patches.
Put your list of patches in patch.list eg: PHSS_XXXXX
PHCO_XXXXX
Be sure to modify the location of the .list files in the script.
Run the script and it will generate a file result.list that will tell you if the patches are installed or not.
Hope that this helps to make everyones day a little easier :-)
#!/usr/bin/perl
################################################################################
# Name: patchck.pl
# Description: Check a list of patches supplied from file patch.list
# Author: Craig A. Sharp
# Syntax: patchck
# Options: None
# Version: 1.0.0
# Date: 11/15/2001
################################################################################
# Change Log:
# Date Programmer Description
# ---------- --------------- -------------------------------------------------
################################################################################
$patchfile = "/home/admin/patch_check/patch.list";
$results = ">/home/admin/patch_check/result.list";
open (listfile, $patchfile) || die "$!";
open (resultfile, $results) || warn "$!";
@patchlist =;
foreach $patch (@patchlist) {
chomp ($patch);
print "-----------------------------------------------------------\n";
print "Checking for patch $patch....\n";
print "\n";
unless (!system "swlist -l patch | grep $patch") {
print resultfile "Patch $patch is not installed.\n";
}
else {
print resultfile "Patch $patch is installed.\n";
}
print "\n";
print "-----------------------------------------------------------\n";
}
close listfile;
close resultfile;
Craig
Here is a simple script in perl to check for install patches.
Put your list of patches in patch.list eg: PHSS_XXXXX
PHCO_XXXXX
Be sure to modify the location of the .list files in the script.
Run the script and it will generate a file result.list that will tell you if the patches are installed or not.
Hope that this helps to make everyones day a little easier :-)
#!/usr/bin/perl
################################################################################
# Name: patchck.pl
# Description: Check a list of patches supplied from file patch.list
# Author: Craig A. Sharp
# Syntax: patchck
# Options: None
# Version: 1.0.0
# Date: 11/15/2001
################################################################################
# Change Log:
# Date Programmer Description
# ---------- --------------- -------------------------------------------------
################################################################################
$patchfile = "/home/admin/patch_check/patch.list";
$results = ">/home/admin/patch_check/result.list";
open (listfile, $patchfile) || die "$!";
open (resultfile, $results) || warn "$!";
@patchlist =
foreach $patch (@patchlist) {
chomp ($patch);
print "-----------------------------------------------------------\n";
print "Checking for patch $patch....\n";
print "\n";
unless (!system "swlist -l patch | grep $patch") {
print resultfile "Patch $patch is not installed.\n";
}
else {
print resultfile "Patch $patch is installed.\n";
}
print "\n";
print "-----------------------------------------------------------\n";
}
close listfile;
close resultfile;
Craig
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP