changeset 4171:2a6b8dff73c0

<oerjan> sed -i \'2s!sed.*!lowercase | sed \'\\\'\'s/^(a|the) //;s/[Ss]\\? .*//\'\\\'\')!\' bin/learn
author HackBot
date Wed, 11 Dec 2013 01:12:19 +0000
parents a124db4df4dc
children e482b4fdcac2
files bin/learn
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/learn	Tue Dec 10 22:05:24 2013 +0000
+++ b/bin/learn	Wed Dec 11 01:12:19 2013 +0000
@@ -1,5 +1,5 @@
 #!/bin/bash
-topic=$(echo "$1" | sed 's/[Ss]\? .*//' | lowercase)
+topic=$(echo "$1" | lowercase | sed 's/^(a|the) //;s/[Ss]? .*//')
 info=$(echo "$1" | sed 's/[^ ]* //')
 echo "$1" >"wisdom/$topic"
 echo "I knew that."