Mercurial > repo
view bin/learn_append @ 5025:0373e583e1cd
<Bike> gcc -Wall hello.c
author | HackBot |
---|---|
date | Tue, 07 Oct 2014 00:21:08 +0000 |
parents | 8d2b2b7ca563 |
children | 301d8fcdf2b3 |
line wrap: on
line source
#!/bin/bash topic=$(echo "$1" | lowercase | sed 's/^\(an\?\|the\) //;s/s\? .*//') stuff=$(echo "$1" | cut -d' ' -f2-) perl -i -p -e 's/\n/ /' "wisdom/$topic" echo "$stuff" >>"wisdom/$topic" echo "I knew that."