From f802013725054031c20a60090babb7ce04738597 Mon Sep 17 00:00:00 2001 From: Ahmed Alsharif Date: Fri, 6 Apr 2018 21:02:46 +0200 Subject: [PATCH] Add $@ to taoup-fortune This allows passing flags, mainly --whitetrash. --- taoup-fortune | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taoup-fortune b/taoup-fortune index 597ef04..4b8ad97 100755 --- a/taoup-fortune +++ b/taoup-fortune @@ -9,9 +9,9 @@ dir=`dirname "${BASH_SOURCE[0]}"` # handle all classes of society if [ `which cowsay 2>/dev/null` ]; then # educated user execution path - $dir/taoup |grep -v '^---' | while read line;do echo $RANDOM'|'$line;done |sort|cut -d"|" -f2- | head -n 1 | /usr/local/bin/cowsay -f eyes -n |head -n 2 |tail -n 1 + $dir/taoup "$@" |grep -v '^---' | while read line;do echo $RANDOM'|'$line;done |sort|cut -d"|" -f2- | head -n 1 | /usr/local/bin/cowsay -f eyes -n |head -n 2 |tail -n 1 echo '' | cowsay -f eyes |tail -n 10 |sed 's/^//' else # impoverished user execution path - $dir/taoup |grep -v '^---' | while read line;do echo $RANDOM'|'$line;done |sort|cut -d"|" -f2- | head -n 1 + $dir/taoup "$@" |grep -v '^---' | while read line;do echo $RANDOM'|'$line;done |sort|cut -d"|" -f2- | head -n 1 fi