#!/bin/bashset -euo pipefail
whileread -rd ":" path
dofor bin in"$path"/*
do# don't error out if there's no manpageset +e
man "$(basename "$bin")"set -e
donedone < <(printf'%s%s'"$PATH"":")
when you get sick of it, hit ^Z (ctrl-z) and go kill%1. Then you get to start all over from the start next time!
Bonus points for starting a tracker so you can count how long it takes to go from “eugh, what’s with that overwrought and excessively defensive bash script” to “fuck, now I’m doing it too”
Well, bash should show up quickly enough. But yeah.
I’m also no longer much of a bash guy. Back when I was my scripts were a lot simpler, and broke in weird ways a lot more. And every time I picked up a new defensive habit, my bash became a little bit uglier, and I thought to myself “maybe I should just do this in Python”.
For those who want to give it a go:
#!/bin/bash set -euo pipefail while read -rd ":" path do for bin in "$path"/* do # don't error out if there's no manpage set +e man "$(basename "$bin")" set -e done done < <(printf '%s%s' "$PATH" ":")
when you get sick of it, hit
^Z
(ctrl-z
) and gokill %1
. Then you get to start all over from the start next time!Bonus points for starting a tracker so you can count how long it takes to go from “eugh, what’s with that overwrought and excessively defensive bash script” to “fuck, now I’m doing it too”
I am not much of a bash guy so it took me a moment to understand what this was doing.
Too bad I have to read so many man pages before I get to bash or sh.
Well,
b
ash should show up quickly enough. But yeah.I’m also no longer much of a bash guy. Back when I was my scripts were a lot simpler, and broke in weird ways a lot more. And every time I picked up a new defensive habit, my bash became a little bit uglier, and I thought to myself “maybe I should just do this in Python”.
But this script would be a lot longer in Python.