view bin/? @ 9347:8ed0d754334f

<tswett> mv wisdom/\xd0\xa1\xd0\xa1\xd0\xa1\xd0\xa0 wisdom/\xd1\x81\xd1\x81\xd1\x81\xd1\x80
author HackBot
date Wed, 19 Oct 2016 02:15:54 +0000
parents 4f32313b94d9
children 426a317d6dfe
line wrap: on
line source

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