Sponsored Content
Top Forums Shell Programming and Scripting Comparing installed software. Post 302231037 by ejk67 on Monday 1st of September 2008 09:46:53 AM
Old 09-01-2008
Ugly but it works.

# I used ssh server1 lslpp -Lc > /tmp/lslpp_files/server1.log to create
# the log files. I then did a cat of all the log files sorting out the unique
# cat /tmp/lslpp_files/*log | cut -d":" -f1 | sort -u

#!/usr/bin/perl
@host=(server1, server2, server3);

for $host (@host) {
open(MYINPUTFILE, "</tmp/lslpp_files/$host.log");
my (@lines) = <MYINPUTFILE>;
foreach $line (@lines)
{
chomp;
next if /^#/;
( $PackageName, $Fileset, $Level, $State, $PTFId, $FixState, $Type, $Description, $DestinationDir, $Uninstaller, $MessageCatalog, $MessageSet, $MessageNumber, $Parent, $Automatic, $EFIXLocked, $InstallPath, $BuildDate ) = split ( /:/, $line);

#print "$host -- $Fileset -- $Level\n";
$HoH{$host}{$Fileset} = $Level;
}
close(MYINPUTFILE);
}
#
# compare file
#
open(COMPFILE, "</tmp/lslpp_files.final");
my (@complines) = <COMPFILE>;

#
# print header
#
print "fileset:server1:server2:server3\n";
foreach $compline (@complines)
{
( $Filset, $Lvl ) = split ( /:/, $compline);
print "$Filset";
for $host (@host) {
print ":$HoH{$host}{$Filset}";
}
print "\n";
}
close(COMPFILE);
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Knowing installed software versions

Hello, Is there any command or something to know the versions of the softwares installed ? Similar to the registry in Windows, is there anything in Unix ...? We are shifting our server to other one ... so we need to install the same versions on other server also .. Please advice, ... (3 Replies)
Discussion started by: Jayathirtha
3 Replies

2. UNIX for Dummies Questions & Answers

Installed software

I am a complete novice/dumbo with Unix. How can I ascertain what software is installed on a unix system? Any help is much appreciated. (3 Replies)
Discussion started by: wakeley
3 Replies

3. UNIX for Dummies Questions & Answers

Installed Software

Pls guys, what command do i use to dispaly the Disk size and Ram Size my system? thanks (1 Reply)
Discussion started by: tt1ect
1 Replies

4. UNIX for Advanced & Expert Users

Listing all Software and Tools installed

Hi, In Unix, how do we know, which software and tools are installed? Is there any command or info file available for the same? Regards, (7 Replies)
Discussion started by: hasnain
7 Replies

5. UNIX for Advanced & Expert Users

listing installed software

hi,:) In redhat linux whats the command to list all the installed s/w. cheers RRK (2 Replies)
Discussion started by: ravi raj kumar
2 Replies

6. Programming

How To find if Specific Software is installed ?

Hi all, I have developed an application in linux that uses MySQL and unixODBC. Now I am making a small installer for this application that configures environment for this application. What I need is the way to check if MySQL and unixODBC is installed on the system before I start installing my... (3 Replies)
Discussion started by: noble_curious
3 Replies

7. UNIX for Dummies Questions & Answers

compiled software installed correctly?

Greetings all, first time poster. I have always had an interest in Unix and so decided to try and learn some on my own. I have learned a great deal by just lurking, so for those of you who patiently share your knowledge-thank you! I am in the process of compiling and installing some... (3 Replies)
Discussion started by: RobertSubnet
3 Replies

8. Solaris

Which Solaris 10 software group is installed?

Hey Forumers- I know how to tell which update of Solaris 10 is installed on my systems (/etc/release) but how can I determine which software group is installed? reduced network support software group (SUNWCrnet) core system support software group (SUNWCreq) end user system support... (2 Replies)
Discussion started by: bluescreen
2 Replies

9. UNIX for Dummies Questions & Answers

Command to see what software installed on linux server

I am using red hat linux server. I need to know what softwares installed on that server. What command can i use to get this list? Any help is highly appreciated. (2 Replies)
Discussion started by: govindts
2 Replies

10. Red Hat

Is it possible access software installed on one partition from another

Hello Team my scenario is like i have 2 partitions on server. /apps and /home and i am trying to install my software in /apps partition.intstallation is successful but when i am trying to open something in that its showing blank screen. now if i install that software in /home it works... (2 Replies)
Discussion started by: lalgourav1983
2 Replies
epm(1)                                                        Easy Software Products                                                        epm(1)

NAME
epm - create software packages. SYNOPSIS
epm [ -a architecture ] [ -f format ] [ -g ] [ -k ] [ -m name ] [ -n[mrs] ] [ -s setup.xpm ] [ --depend ] [ --help ] [ --keep-files ] [ --output-dir directory ] [ --setup-image setup.xpm ] [ --setup-program /foo/bar/setup ] [ --setup-types setup.types ] [ -v ] [ name=value ... name=value ] product [ listfile ] DESCRIPTION
epm generates software packages complete with installation, removal, and (if necessary) patch scripts. Unless otherwise specified, the files required for product are read from a file named "product.list". The -a option ("architecture") specifies the actual architecture for the software. Without this option the generic processor architecture is used ("intel", "sparc", "mips", etc.) The -f option ("format") specifies the distribution format: aix Generate an AIX distribution suitable for installation on an AIX system. bsd Generate a BSD distribution suitable for installation on a FreeBSD, NetBSD, or OpenBSD system. deb Generate a Debian distribution suitable for installation on a Debian Linux system. inst, tardist Generate an IRIX distribution suitable for installation on an system running IRIX. lsb, lsb-signed Generate RPM packages for LSB-conforming systems. The lsb-signed format uses the GPG private key you have defined in the ~/.rpmmacros file. native Generate an native distribution. This uses rpm for Linux, inst for IRIX, pkg for Solaris, swinstall for HP-UX, bsd for FreeBSD, Net- BSD, and OpenBSD, and osx for MacOS X. All other operating systems default to the portable format. osx Generate a MacOS X software package. pkg Generate an AT&T software package. These are used primarily under Solaris. portable Generate a portable distribution based on shell scripts and tar files. The resulting distribution is installed and removed the same way on all operating systems. [default] rpm, rpm-signed Generate a Red Hat Package Manager ("RPM") distribution suitable for installation on a Red Hat Linux system. The rpm-signed format uses the GPG private key you have defined in the ~/.rpmmacros file. setld Generate a Tru64 (setld) software distribution. slackware Generate a Slackware Linux software distribution. swinstall, depot Generate a HP-UX software distribution. Executable files in the distribution are normally stripped of debugging information when packaged. To disable this functionality use the -g option. Intermediate (spec, etc.) files used to create the distribution are normally removed after the distribution is created. The -k option keeps these files in the distribution directory. The -s and --setup-image options ("setup") include the ESP Software Wizard with the specified GIF or XPM image file with the distribution. This option is currently only supported by portable and RPM distributions. The --setup-program option specifies the setup executable to use with the distribution. This option is currently only supported by portable distributions. The --setup-types option specifies the setup.types file to include with the distribution. This option is currently only supported by porta- ble distributions. The --output-dir option specifies the directory to place output file into. The default directory is based on the operating system, version, and architecture. The -v option ("verbose") increases the amount of information that is reported. Use multiple v's for more verbose output. The --depend option lists the dependent (source) files for all files in the package. Distributions normally are named "product-version-system-release-machine.ext" and "product-version-system-release-machine-patch.ext" (for patch distributions.) The "system-release-machine" information can be customized or eliminated using the -n option with the appropriate trailing letters. Using -n by itself will remove the "system-release-machine" string from the filename entirely. The "system-release- machine" information can also be customized by using the -m option with an arbitrary string. Debian, IRIX, portable, and Red Hat distributions use the extensions ".deb", ".tardist", "tar.gz", and ".rpm" respectively. LIST FILES
The EPM list file format is now described in the epm.list(5) man page. KNOWN BUGS
EPM does not currently support generation of IRIX software patches. SEE ALSO
epminstall(1) - add a directory, file, or symlink to a list file mkepmlist(1) - make an epm list file from a directory epm.list(5) - epm list file format setup(1) - graphical setup program for the esp package manager COPYRIGHT
Copyright 1999-2008 by Easy Software Products, All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 26 August 2008 ESP Package Manager epm(1)
All times are GMT -4. The time now is 03:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy