view bin/slashlearn @ 5302:9d3e2019ee31

<oerjan> slashlearn tdt/That doesn\'t tdt.
author HackBot
date Wed, 08 Apr 2015 05:00:38 +0000
parents 7a75388fddf0
children
line wrap: on
line source

#!/bin/bash
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»"