HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Installed patch verification script -- Have fun!
Operating System - HP-UX
1833589
Members
4237
Online
110061
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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 2025 Hewlett Packard Enterprise Development LP