view src/pkg-examine.pl @ 25:d956ace7380e

creating pkg-examine.
author Robert McIntyre <rlm@mit.edu>
date Thu, 10 Jan 2013 15:12:34 +0000
parents
children dd480255bd82
line wrap: on
line source
1 #!/usr/bin/perl
4 if ($ARGV[0] eq "--help"){
5 print <<"HERE";
7 pkg-examine -- print package contents.
9 Written by Robert McIntyre. This software is free
10 software and is released to the public domain.
12 HERE
13 exit 0;
14 }
18 $" = " ";
19 $pkg_name = $ARGV[0];
21 `id -g $pkg_name 2>/dev/null`;
22 if ($?){
23 print "No group named $pkg_name.";
24 exit 0;}
26 @files = split(/\0/, `find /usr /opt /etc -group $pkg_name -print0`);
28 print "@files\n";