Mercurial > repo
changeset 4960:08f4d34ddc3b
<oerjan> sed -i "4cperl -i -p -e \'s/\\n/ /\' "\'"wisdom/$topic"\' bin/learn_append # from stackoverflow
author | HackBot |
---|---|
date | Tue, 30 Sep 2014 06:06:14 +0000 |
parents | 454d020bf893 |
children | ba9a651a9df9 |
files | bin/learn_append |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/learn_append Tue Sep 30 06:05:40 2014 +0000 +++ b/bin/learn_append Tue Sep 30 06:06:14 2014 +0000 @@ -2,6 +2,7 @@ topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//') stuff=$(echo "$1" | cut -d' ' -f2-) perl -i -p -e 's/ +/ /' "wisdom/$topic" //' "wisdom/$topic" echo "$stuff" >>"wisdom/$topic" echo "I knew that."