Mercurial > repo
view bin/slashlearn @ 6471:6fa2991985ad
<izabera> ` sed -i s/!// bin/2015
author | HackBot |
---|---|
date | Thu, 31 Dec 2015 20:32:45 +0000 |
parents | 9c603f748542 |
children | 73ffca368bac |
line wrap: on
line source
#!/bin/bash [[ "$1" = */* ]] || exit topic=$(echo "$1" | lowercase | cut -d / -f 1) [ -z "$topic" ] && exit 1 value=$(echo "$1" | cut -d / -f 2-) echo "$value" > wisdom/"$topic" && echo "Learned «$topic»"