view bin/? @ 10513:28c4c6b6e9bd

<wob_jonas> `` sed -i \'s/M3/Saw Gerrera|Shmi|Sio Bibble|Sith Lord Jar Jar|Supreme Leader Snoke|Taun We|Watto|Wedge Antilles|Willard|Yoda|Zam Wessel|the Dianoga|the Rancor|the Sarlacc/\' bin/starwars && cat bin/starwars
author HackBot
date Sun, 26 Mar 2017 02:00:49 +0000
parents 4d09ce3dbd12
children d5f74afaf00f
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" ];
    then cat "$topic";
    elif [ -e "$topic1" ];
    then cat "$topic1";
    elif [ -e "$topic2" ];
    then cat "$topic2";
    else echo "$1? ¯\(°​_o)/¯"; exit 1;
fi | rnooodl