view bin/learn @ 6144:c20d4be5afa6

<oerjan> ` sed -i \'s/[?] /?[,.!?]\\\\? /\' bin/learn
author HackBot
date Mon, 26 Oct 2015 04:58:14 +0000
parents 3ba33322fa81
children d4aebeacae03
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"