view bin/slashlearn @ 5782:0da13079a223

<shachaf> ` ln -s \'`\' bin/\'\x0f\'
author HackBot
date Thu, 02 Jul 2015 15:48:24 +0000
parents e281f5947a6a
children 9c7426991c5f 9c603f748542
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»"