Mercurial > repo
comparison bin/learn_append @ 9075:c989a1669243
<fizzie> revert 58b9ee8f97a7
author | HackBot |
---|---|
date | Sun, 25 Sep 2016 20:31:46 +0000 |
parents | |
children | 364f0d88ee3a |
comparison
equal
deleted
inserted
replaced
9074:560a73f4f0a4 | 9075:c989a1669243 |
---|---|
1 #!/bin/bash | |
2 topic="$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//')" | |
3 stuff=$(echo "$1" | cut -d' ' -f2-) | |
4 perl -i -p -e 's/\n/ /' "wisdom/$topic" | |
5 echo "$stuff" >>"wisdom/$topic" | |
6 echo -n "Learned '$topic': " | |
7 cat "wisdom/$topic" |