view bin/slashlearn @ 7416:cf8538dacd3e

<b_jonas> learn norm is the most confusingly named function in C++
author HackBot
date Sun, 17 Apr 2016 20:17:33 +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»"