Skip to content

Instantly share code, notes, and snippets.

@shivansh
Last active December 9, 2021 08:31
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save shivansh/a05e3b4152fa75f6f398d423c295edb5 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -euo pipefail
# Here strings are noted to be faster for a small amount of
# data as compared to pipes where the setup cost dominates.
# https://unix.stackexchange.com/a/219806/158139
response=$(w3m -dump "http://explainshell.com/explain?cmd="$(echo $@ | tr ' ' '+'}))
cat -s <(grep -v -e explainshell -e • -e □ -e "source manpages" <<< "$response")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment