#!/bin/bash curl --help &> /dev/null && lynx --help &> /dev/null && sed --help &> /dev/null && which host &> /dev/null; if [ $? -ne 0 ] then echo "host, curl, lynx, and/or sed are required for this script.."; exit 2; fi if ! host command-not-found.com &> /dev/null; then echo "command-not-found.com is not resolving.."; exit 1; fi if [ "$1" ] then echo "Command-not-found.com results:"; echo -e "\n"; curl -sS -L https://command-not-found.com/$1 | lynx --stdin --dump | \ sed -n -e '/Install/,/INS/p' | sed 's/\[INS\: \:INS\]//g'; else echo "null argument given.. quitting"; echo "example: cnf whois"; exit 3; fi