Mercurial > repo
view bin/learn_append @ 9095:9ea11e41b752
<evilmoon> le/rn evil/evil is a special thing, it must be followed by 4 letters of your nickname. it is very evil, and thus is recursive
author | HackBot |
---|---|
date | Mon, 26 Sep 2016 12:54:43 +0000 |
parents | c989a1669243 |
children | 364f0d88ee3a |
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 -n "Learned '$topic': " cat "wisdom/$topic"