view bin/? @ 10257:b727e7b800f7

<oerjan> sled bin/?//4,$s/topic1/topic2/;9ielif [ -e "$topic1" ];
author HackBot
date Wed, 15 Feb 2017 01:20:42 +0000
parents d0d5bc896d19
children 4506d2db5d56
line wrap: on
line source

#!/bin/bash
topic=$(echo "$1" | lowercase | sed "s/noo\+dl/nooodl/;s/ *$//")
topic1=$(echo '`'"$topic" | sed 's/^``//')
topic2=$(echo "$topic" | sed "s/s$//")
cd wisdom
if [ \( "_$topic2"_ = "_ngevd"_ \) -a \( -e ngevd \) ];
    then cat /dev/urandom;
    elif [ -e "$topic" ];
elif [ -e "$topic1" ];
    then cat "$topic";
    elif [ -e "$topic2" ];
    then cat "$topic2";
    else echo "$1? ¯\(°​_o)/¯"; exit 1;
fi | rnooodl