Mercurial > repo
comparison misle/rn_append @ 6783:0c13247bfca4
<oerjan> ` mkdir misle; cp le/* misle; sed -i \'s/wisdom/tmflry/g\' misle/*
author | HackBot |
---|---|
date | Wed, 10 Feb 2016 06:06:12 +0000 |
parents | |
children | c6bb618e60e3 |
comparison
equal
deleted
inserted
replaced
6782:5527970a7be7 | 6783:0c13247bfca4 |
---|---|
1 #!/bin/bash | |
2 [[ "$1" = */* ]] || exit | |
3 topic=$(echo "$1" | lowercase | cut -d / -f 1) | |
4 [ -z "$topic" ] && exit 1 | |
5 stuff=$(echo "$1" | cut -d / -f 2-) | |
6 perl -i -p -e 's/\n/ /' "tmflry/$topic" | |
7 echo "$stuff" >>"tmflry/$topic" | |
8 echo -n "Learned '$topic': " | |
9 cat "tmflry/$topic" |