Skip to content

Instantly share code, notes, and snippets.

@worr
Created December 21, 2014 01:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save worr/23c9c55121ced4467786 to your computer and use it in GitHub Desktop.
Save worr/23c9c55121ced4467786 to your computer and use it in GitHub Desktop.
How to search for OpenBSD packages
/(?(?=.*\(.*?(??{ $ARGV[0] }).*?\).*)\(([A-Za-z0-9\.\-_]+)\)(?{ print $1 =~ s\/\.tgz\/\/r . "\n" }))/g foreach do { (-M ".search_cache/SHA256" > 1 or File::Fetch->new(uri => "http://ftp5.usa.openbsd.org/pub/OpenBSD/5.6/packages/amd64/SHA256")->fetch(to => ".search_cache")) and open(my $fh, ".search_cache/SHA256"); <$fh> }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment