Mercurial > repo
annotate bin/slashlearn @ 7558:cbd0b9f4e0d4
<fizzie> ` mv script{,add} bin/ # I guess they could be there just as well -- but how did you write those things in the first place?
author | HackBot |
---|---|
date | Wed, 27 Apr 2016 23:14:39 +0000 |
parents | b833ca1bf23c |
children |
rev | line source |
---|---|
7140
b833ca1bf23c
<oerjan> mkx bin/slashlearn//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 \xc2\xab$key\xc2\xbb"
HackBot
parents:
7137
diff
changeset
|
1 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»" |