view bin/learn @ 6447:5ad3f5c0dca0

<olsner> rm wisdom/"thing
author HackBot
date Tue, 22 Dec 2015 15:31:37 +0000
parents d4aebeacae03
children efa261b3fed0
line wrap: on
line source

#!/bin/bash
topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\?[:;,.!?]\? .*//')
echo "$1" >"wisdom/$topic"
echo "Learned '$topic': $1"