Mercurial > repo
changeset 4967:c4aabc33e0d5
<oerjan> sed -i "4iperl -i -p -e \'s/"\'\\\\n\'"/ /\' "\'"wisdom/$topic"\' bin/learn_append # from stackoverflow
author | HackBot |
---|---|
date | Tue, 30 Sep 2014 06:10:43 +0000 |
parents | 868dd7ee44b5 |
children | e28b85526216 |
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:10:23 2014 +0000 +++ b/bin/learn_append Tue Sep 30 06:10:43 2014 +0000 @@ -1,5 +1,6 @@ #!/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 "I knew that."