Mercurial > repo
diff bin/learn_append @ 11265:364f0d88ee3a
<oerjan> sled bin/learn_append//2s,s/.*;,,
author | HackBot |
---|---|
date | Tue, 12 Dec 2017 22:00:17 +0000 |
parents | c989a1669243 |
children | 60f7b5cdcdb7 |
line wrap: on
line diff
--- a/bin/learn_append Tue Dec 12 21:58:47 2017 +0000 +++ b/bin/learn_append Tue Dec 12 22:00:17 2017 +0000 @@ -1,5 +1,5 @@ #!/bin/bash -topic="$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//')" +topic="$(echo "$1" | lowercase | sed 's/s\? .*//')" stuff=$(echo "$1" | cut -d' ' -f2-) perl -i -p -e 's/\n/ /' "wisdom/$topic" echo "$stuff" >>"wisdom/$topic"