changeset 9047:dfc5682ee287

<fizzie> ` sed -i -e \'s/{/if [ -n "$f" ]; then/;s/} |/else echo "that\'\\\'\'s not wise"; fi |/\' bin/wisdom
author HackBot
date Fri, 16 Sep 2016 22:47:19 +0000
parents bc9db01df0a9
children 2c1f48794727
files bin/wisdom
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/wisdom	Fri Sep 16 22:28:03 2016 +0000
+++ b/bin/wisdom	Fri Sep 16 22:47:19 2016 +0000
@@ -1,1 +1,1 @@
-f=$(find wisdom -ipath "wisdom/*$1*" -type f -print0 | shuf -z -n1); { echo -n "${f#wisdom/}//"; cat "$f"; } | rnooodl
+f=$(find wisdom -ipath "wisdom/*$1*" -type f -print0 | shuf -z -n1); if [ -n "$f" ]; then echo -n "${f#wisdom/}//"; cat "$f"; else echo "that's not wise"; fi | rnooodl