Mercurial > repo
view bin/slashlearn @ 7710:c21f155790d9
<tswett> cat \'#!/bin/rm\' > bin/you-can-only-run-this-once; chmod +x you-can-only-run-this-once
author | HackBot |
---|---|
date | Wed, 04 May 2016 00:33:56 +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»"