view bin/? @ 1841:815fbe2140e3

<oerjan> sed -i -e \'2acd wisdom\' -e \'s/wisdom\\///\' bin/\'?\'
author HackBot
date Sat, 26 Jan 2013 00:38:37 +0000
parents 84c0476f1345
children 8842fd6938f6
line wrap: on
line source

#!/bin/sh
topic=$(echo "$1" | tr A-Z a-z | sed "s/ *$//")
cd wisdom
topic1=$(echo "$topic" | sed "s/s$//")
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