view bin/? @ 1862:4c990f436a32

<Taneb> echo "No-one was ever called Elliot." > wisdom/elliot
author HackBot
date Sat, 26 Jan 2013 22:55:32 +0000
parents dbc93d96b539
children 2355c0160b25
line wrap: on
line source

#!/bin/sh
topic=$(echo "$1" | tr A-Z a-z | sed "s/ *$//")
topic1=$(echo "$topic" | sed "s/s$//")
cd wisdom
if [ \( "$topic" = "ngevd" \) -a \( -e ngevd \) ];
    then cat /dev/urandom;
    elif [ -e "$topic" ];
    then cat "$topic";
    elif [ -e "$topic1" ];
    then cat "$topic1";
    else echo "$1? ¯\(°_o)/¯"; exit 1;
fi