view bin/learn_append @ 5045:84864da646b0

<oerjan> revert
author HackBot
date Fri, 10 Oct 2014 11:40:48 +0000
parents 301d8fcdf2b3
children b2d3e73889a9
line wrap: on
line source

#!/bin/bash
topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//')
stuff=$(echo "$1" | cut -d' ' -f2-)
perl -i -p -e 's/\n/ /' "wisdom/$topic"
echo "$stuff" >>"wisdom/$topic"
echo "I knew that."