The Guide shows you How to Looking For from Command Line and Finding Packages with Dependencies on a Unix OpenBSD 5 System.
For Details and deeper Insight about the Script go to: calomel.org.
Finally, the post’s Content is Expressly Reduced to Give Focus to the Essentials Instructions and Commands.

-
Open a Command Line Session
-
Install the pkg_find Script
sudo su
If Got “User is Not in Sudoers file” then see: How to Enable sudo
mkdir /home/scripts
vi /home/scripts/pkg_find.sh
Type “i” to Start Editing on Vim
Inserts:#!/bin/sh # ## Calomel.org .:. pkg_find v0.07 ## Revisited by Emil # export PKG_PATH=http://ftp.ch.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m) # ## location of the local package listing file PACKAGES=/usr/local/sbin/pkg_find_package_listing.html if [ $# -eq 0 ] then echo "" echo "EmilMod::Calomel.org.:.pkg_find" echo "————————————-" echo "For the 1st run, you need to edit this file, by compiling the PKG_PATH variable, with one of the OpenBSD FTP Mirrors listed at:" echo "http://www.openbsd.org/ftp.html#http” echo "" echo "If it is potential, choose the nearest to your location." echo "" echo "" echo "Syntax Usage: pkg_info [-u|string|–help]" echo "" echo "1) -u = Update the local package listing." echo "2) 'string' = The package name or partial string of the package name you are looking for." echo "3) -help = Show this help!" echo "" echo "Anything else will be taken as a 'string' for the pkg_find query." echo "" exit fi if [ $1 = "–help" ] then echo "" echo "EmilMod::Calomel.org.:.pkg_find" echo "————————————-" echo "For the 1st run, you need to edit this file, by compiling the PKG_PATH variable, with one of the OpenBSD FTP Mirrors listed at:" echo "http://www.openbsd.org/ftp.html#http” echo "" echo "If it is potential, choose the nearest to your location." echo "" echo "" echo "Syntax Usage: pkg_info [-u|string]" echo "" echo "1) -u = Update the local package listing." echo "2) 'string' = The package name or partial string of the package name you are looking for." echo "3) -help = Show this help!" echo "" echo "Anything else will be taken as a 'string' for the pkg_find query." echo "" exit fi if [ $1 = "-u" ] then echo "" echo -e "33[32m Download the package listing to $PACKAGES33[0m" echo "" wget -O $PACKAGES $PKG_PATH echo "" exit fi if [ $1 = "$@" ] then if [ -e $PACKAGES ] then echo "" echo -e "33[32m Packages matching your query: $@33[0m" echo "" cat $PACKAGES | grep -i $@ | cut -d" -f6 echo "" PKT_COUNT=$(cat $PACKAGES | grep -i $@ | cut -d" -f6 | wc -l | sed 's/[ \t]*//') echo -e "33[32m $PKT_COUNT packets matched.33[0m" else echo "" echo -e "33[32m $PACKAGES file does not exist. Run 'pkg_find -u' to update33[0m" echo "" fi exit fi
Thanks to: dant.net.ru
Esc and after :wq to Save & Exit from Vim :)
Give Right Permissions:chmod +x /home/scripts/pkg_find.sh
Make a Symlink for Easy Use:
ln -s /home/scripts/pkg_find.sh /usr/local/bin/pkg_find
-
Installing Needed Bash Shell
pkg_add -v [URL]/bash[x.y.z].tgz
OpenBSD How to Easy Find Repo URL for Installing New Packages:
OpenBSD Find Packages Repository -
SetUp the Environment Variable PKG_PATH
exit
vi /home/
/.profile source /home/
/.profile -
Downloading/Updating the Packages List
pkg_find -u
The Packages List is Saved into File: /home/scripts/pkg_find_package_listing.html
-
Looking For OpenBSD Packges
pkg_find
pkg_find tidy