view le/rn_append @ 7477:98fd473cd50e

<b_jonas> slashlearn font/#esoteric bitmap fonts include: \\oren\\\'s font http://www.orenwatson.be/fontdemo.htm , lifthrasiir\'s font https://github.com/lifthrasiir/unison/ https://lifthrasiir.github.io/unison/sample.png , b_jonas\'s font http://www.math.bme.hu/~ambrus/pu/fecupboard20-c.pcf.gz
author HackBot
date Mon, 18 Apr 2016 21:01:34 +0000
parents 07e92c85b28c
children 0356fbd182e8
line wrap: on
line source

#!/bin/bash
[[ "$1" = */* ]] || exit
topic=$(echo "$1" | lowercase | cut -d / -f 1)
[ -z "$topic" ] && exit 1
stuff=$(echo "$1" | cut -d / -f 2-)
perl -i -p -e 's/\n/ /' "wisdom/$topic"
echo "$stuff" >>"wisdom/$topic"
echo -n "Learned '$topic': "
cat "wisdom/$topic"