comparison 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
comparison
equal deleted inserted replaced
24:eab9ad213a69 25:d956ace7380e
1 #!/usr/bin/perl
2
3
4 if ($ARGV[0] eq "--help"){
5 print <<"HERE";
6
7 pkg-examine -- print package contents.
8
9 Written by Robert McIntyre. This software is free
10 software and is released to the public domain.
11
12 HERE
13 exit 0;
14 }
15
16
17
18 $" = " ";
19 $pkg_name = $ARGV[0];
20
21 `id -g $pkg_name 2>/dev/null`;
22 if ($?){
23 print "No group named $pkg_name.";
24 exit 0;}
25
26 @files = split(/\0/, `find /usr /opt /etc -group $pkg_name -print0`);
27
28 print "@files\n";