view bin/learn_append @ 5003:8d2b2b7ca563

<oerjan> revert 4999
author HackBot
date Thu, 02 Oct 2014 04:11:20 +0000
parents
children 301d8fcdf2b3
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."