view bin/slashlearn @ 5882:4c331b3a4c04

<mroman> learn fisdom is the domination by the feder inspection station.
author HackBot
date Mon, 03 Aug 2015 12:06:51 +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»"