Mercurial > repo
changeset 4950:32f43246a58f
<oerjan> sed -i "4ised -i \'y/"\'\\n\'"/ /"\'wisdom/$topic\' bin/learn_append
author | HackBot |
---|---|
date | Tue, 30 Sep 2014 05:50:35 +0000 |
parents | 0a39e18eb3f0 |
children | f843a1572d32 |
files | bin/learn_append |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/learn_append Tue Sep 30 00:49:13 2014 +0000 +++ b/bin/learn_append Tue Sep 30 05:50:35 2014 +0000 @@ -1,5 +1,7 @@ #!/bin/bash topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//') stuff=$(echo "$1" | cut -d' ' -f2-) +sed -i 'y/ +/ /wisdom/$topic echo "$stuff" >>"wisdom/$topic" echo "I knew that."