Mercurial > repo
view bin/slashlearn @ 9466:f0e4ef9ab8b0
<oerjan> sled bin/slashlearn//s/; /\\n/g
author | HackBot |
---|---|
date | Thu, 27 Oct 2016 01:03:52 +0000 |
parents | e029f1996c28 |
children | 02576f427b4b |
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': $value"