view bin/learn @ 7010:974c1217a5cd

<b_jonas> perl -e($o="bin/culprits-ng"); open$O,">",$o or die; print $O "#!/bin/sh\\n",q{exec hg log -l 512 --template "{desc}\\0" -- "$@" | perl -0ne \'/^<([^>]*)>/ and print"$1 "\'},"\\n"; close$O;chmod 0755,$o or die;
author HackBot
date Thu, 25 Feb 2016 07:22:49 +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"