changeset 4958:52a7f7c9dc4f

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