comparison bin/learn_append @ 5643:56dcce63901b

<tswett> revert
author HackBot
date Sun, 21 Jun 2015 02:47:59 +0000
parents
children 38b26e48d344
comparison
equal deleted inserted replaced
5642:987c834ab84d 5643:56dcce63901b
1 #!/bin/bash
2 topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//')
3 stuff=$(echo "$1" | cut -d' ' -f2-)
4 perl -i -p -e 's/\n/ /' "wisdom/$topic"
5 echo "$stuff" >>"wisdom/$topic"
6 echo -n "Learned '$topic': "
7 cat "wisdom/$topic"