Mercurial > repo
view bin/slashlearn @ 9995:6dafe99af36a
<shachaf> addquote <int-e> fungot is here <fungot> int-e: may cause extreme loss of appetite! may cause severe diarrhea and vomiting!
author | HackBot |
---|---|
date | Sun, 18 Dec 2016 19:05:14 +0000 |
parents | 68aaf05e3aec |
children | 7d14a8891360 |
line wrap: on
line source
sep="//" [[ "$1" == ?*"$sep"* ]] || { echo 'All le//rn variants now use two slashes in the format.' >&2 ; exit 1; } key="$(echo "${1%%$sep*}" | lowercase)" value="${1#*$sep}" [ -e "wisdom/$key" ] && verb="Relearned" || verb="Learned" echo "$value" > "$(echo-p "wisdom/$key")" && echo -n "$verb '$key': $(echo "$value" | sed 's.^[ ].0,04&.')"