Skip to content

Instantly share code, notes, and snippets.

@tygerbytes
Created August 17, 2021 21:59
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 tygerbytes/998a4b0477361dc83f9fa66cd5329df1 to your computer and use it in GitHub Desktop.
Save tygerbytes/998a4b0477361dc83f9fa66cd5329df1 to your computer and use it in GitHub Desktop.
Mansplaining whatis wrapper :-)
function mansplain() {
desc=$(whatis $1 2>&1 | head -1 | grep -o -P '\- .*$' | cut -c 3-)
if [[ -z "$desc" ]]; then
echo "Well I've never heard of \"$1\", so it doesn't exist"
else
echo "Well, actually, it's more like $desc"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment