comparison bin/learn @ 9075:c989a1669243

<fizzie> revert 58b9ee8f97a7
author HackBot
date Sun, 25 Sep 2016 20:31:46 +0000
parents
children 148a9eb1caa3
comparison
equal deleted inserted replaced
9074:560a73f4f0a4 9075:c989a1669243
1 #!/bin/bash
2 topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\?[:;,.!?]\? .*//')
3 [ -e "wisdom/$topic" ] && verb="Relearned" || verb="Learned"
4 echo "$1" >"$(echo-p "wisdom/$topic")"
5 echo "$verb '$topic': $1"
6