Mercurial > repo
view bin/slashlearn @ 8098:7a3c984b2539
<oerjan> learn admn is the curse of people with cdop.
author | HackBot |
---|---|
date | Mon, 23 May 2016 01:07:47 +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»"