Mercurial > repo
view bin/learn_append @ 4950:32f43246a58f
<oerjan> sed -i "4ised -i \'y/"\'\\n\'"/ /"\'wisdom/$topic\' bin/learn_append
author | HackBot |
---|---|
date | Tue, 30 Sep 2014 05:50:35 +0000 |
parents | dd3a2d8816d2 |
children | f843a1572d32 |
line wrap: on
line source
#!/bin/bash topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//') stuff=$(echo "$1" | cut -d' ' -f2-) sed -i 'y/ / /wisdom/$topic echo "$stuff" >>"wisdom/$topic" echo "I knew that."