Sponsored Content
Top Forums Shell Programming and Scripting Comparing installed software. Post 302230792 by era on Sunday 31st of August 2008 11:42:39 AM
Old 08-31-2008
Do you have a master list of what software should be installed?

You might want to use Perl or Awk to read the versions into an array (Perh hash) and then in the end print missing packages (array keys) and wrong versions (key values).
 

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
ExtUtils::Packlist(3pm) 				 Perl Programmers Reference Guide				   ExtUtils::Packlist(3pm)

NAME
ExtUtils::Packlist - manage .packlist files SYNOPSIS
use ExtUtils::Packlist; my ($pl) = ExtUtils::Packlist->new('.packlist'); $pl->read('/an/old/.packlist'); my @missing_files = $pl->validate(); $pl->write('/a/new/.packlist'); $pl->{'/some/file/name'}++; or $pl->{'/some/other/file/name'} = { type => 'file', from => '/some/file' }; DESCRIPTION
ExtUtils::Packlist provides a standard way to manage .packlist files. Functions are provided to read and write .packlist files. The original .packlist format is a simple list of absolute pathnames, one per line. In addition, this package supports an extended format, where as well as a filename each line may contain a list of attributes in the form of a space separated list of key=value pairs. This is used by the installperl script to differentiate between files and links, for example. USAGE
The hash reference returned by the new() function can be used to examine and modify the contents of the .packlist. Items may be added/deleted from the .packlist by modifying the hash. If the value associated with a hash key is a scalar, the entry written to the .packlist by any subsequent write() will be a simple filename. If the value is a hash, the entry written will be the filename followed by the key=value pairs from the hash. Reading back the .packlist will recreate the original entries. FUNCTIONS
new() This takes an optional parameter, the name of a .packlist. If the file exists, it will be opened and the contents of the file will be read. The new() method returns a reference to a hash. This hash holds an entry for each line in the .packlist. In the case of old- style .packlists, the value associated with each key is undef. In the case of new-style .packlists, the value associated with each key is a hash containing the key=value pairs following the filename in the .packlist. read() This takes an optional parameter, the name of the .packlist to be read. If no file is specified, the .packlist specified to new() will be read. If the .packlist does not exist, Carp::croak will be called. write() This takes an optional parameter, the name of the .packlist to be written. If no file is specified, the .packlist specified to new() will be overwritten. validate() This checks that every file listed in the .packlist actually exists. If an argument which evaluates to true is given, any missing files will be removed from the internal hash. The return value is a list of the missing files, which will be empty if they all exist. packlist_file() This returns the name of the associated .packlist file EXAMPLE
Here's "modrm", a little utility to cleanly remove an installed module. #!/usr/local/bin/perl -w use strict; use IO::Dir; use ExtUtils::Packlist; use ExtUtils::Installed; sub emptydir($) { my ($dir) = @_; my $dh = IO::Dir->new($dir) || return(0); my @count = $dh->read(); $dh->close(); return(@count == 2 ? 1 : 0); } # Find all the installed packages print("Finding all installed modules... "); my $installed = ExtUtils::Installed->new(); foreach my $module (grep(!/^Perl$/, $installed->modules())) { my $version = $installed->version($module) || "???"; print("Found module $module Version $version "); print("Do you want to delete $module? [n] "); my $r = <STDIN>; chomp($r); if ($r && $r =~ /^y/i) { # Remove all the files foreach my $file (sort($installed->files($module))) { print("rm $file "); unlink($file); } my $pf = $installed->packlist($module)->packlist_file(); print("rm $pf "); unlink($pf); foreach my $dir (sort($installed->directory_tree($module))) { if (emptydir($dir)) { print("rmdir $dir "); rmdir($dir); } } } } AUTHOR
Alan Burlison <Alan.Burlison@uk.sun.com> perl v5.18.2 2013-11-04 ExtUtils::Packlist(3pm)
All times are GMT -4. The time now is 03:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy