view bin/slashlearn @ 5232:8e51f494e522

<int-e> ` echo \'welcome "$@" | sed s/\\\\\\<.//g\' > bin/elcome
author HackBot
date Sat, 03 Jan 2015 22:58:33 +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»"