| Category: | utilities |
| Author/Contact Info | Aunir@hotmail.com |
| Description: | FreeBSD users, are you tired of having to pkg_delete <extremely long and complex filename> over a series of related packages? Say for example, XFree86*****? I hacked this up to avoid much frustration in the process. |
#!/usr/bin/perl -w
use strict;
open INFO, "pkg_info|grep XF|" or die can't smoke that pipe: $!";
#ok, so it's package specific...
chomp( my @input = <INFO> );
foreach(@input){
s/([\w\.\-\,]+)\s+.*/\1/;
system "pkg_delete $_";
print "$_ ==>\n Deleted!\n";
}
#yeah, that regex looks ugly, but it worked.
#I guess I'm most proud that this is the first time I've really used p
+erl for something useful.
|
|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pkg_delete for similar packages
by xiphias (Initiate) on Jun 27, 2002 at 03:56 UTC | |
by Anonymous Monk on Jun 27, 2002 at 13:56 UTC | |
|
Re: pkg_delete for similar packages
by kappa (Chaplain) on Jun 26, 2002 at 09:13 UTC | |
by Anonymous Monk on Jun 26, 2002 at 13:11 UTC |