annotate bin/learn @ 11003:5132092fa1b4

<int-e> ` echo int-e >> bin/dontaskdonttelllist
author HackBot
date Thu, 08 Jun 2017 15:00:15 +0000
parents c989a1669243
children 148a9eb1caa3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9075
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
1 #!/bin/bash
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
2 topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\?[:;,.!?]\? .*//')
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
3 [ -e "wisdom/$topic" ] && verb="Relearned" || verb="Learned"
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
4 echo "$1" >"$(echo-p "wisdom/$topic")"
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
5 echo "$verb '$topic': $1"
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
6