changeset 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
files bin/?
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/bin/?	Sat Jan 26 00:31:48 2013 +0000
+++ b/bin/?	Sat Jan 26 00:38:37 2013 +0000
@@ -1,12 +1,13 @@
 #!/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 wisdom/ngevd \) ];
+if [ \( "$topic" = "ngevd" \) -a \( -e ngevd \) ];
     then cat /dev/urandom;
-    elif [ -e "wisdom/$topic" ];
-    then cat "wisdom/$topic";
-    elif [ -e "wisdom/$topic1" ];
-    then cat "wisdom/$topic1";
+    elif [ -e "$topic" ];
+    then cat "$topic";
+    elif [ -e "$topic1" ];
+    then cat "$topic1";
     else echo "$1? ¯\(°_o)/¯"; exit 1;
 fi