Mercurial > repo
view bin/learn_append @ 11265:364f0d88ee3a
<oerjan> sled bin/learn_append//2s,s/.*;,,
author | HackBot |
---|---|
date | Tue, 12 Dec 2017 22:00:17 +0000 |
parents | c989a1669243 |
children | 60f7b5cdcdb7 |
line wrap: on
line source
#!/bin/bash topic="$(echo "$1" | lowercase | sed 's/s\? .*//')" stuff=$(echo "$1" | cut -d' ' -f2-) perl -i -p -e 's/\n/ /' "wisdom/$topic" echo "$stuff" >>"wisdom/$topic" echo -n "Learned '$topic': " cat "wisdom/$topic"