Mercurial > repo
view bin/slashlearn @ 7358:56f8ad45942b
<oerjan> le/rn spaghetti stack/A spaghetti stack is the most edible data structure.
author | HackBot |
---|---|
date | Mon, 04 Apr 2016 09:26:40 +0000 |
parents | b833ca1bf23c |
children |
line wrap: on
line source
sep="/"; [[ "$0" == *//* ]] && sep="//"; [[ "$1" == ?*"$sep"* ]] || exit 1; key="$(echo "${1%%$sep*}" | lowercase)"; value="${1#*$sep}"; [ -e "wisdom/$key" ] && verb="Relearned" || verb="Learned"; echo "$value" > "$(echo-p "wisdom/$key")" && echo "$verb «$key»"