From 5791c07d48e36b2c051cc10254003602bca27a2a Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Wed, 7 May 2014 09:57:21 -0500 Subject: [PATCH] Only print fortunes in terminals --- runcoms/zlogin | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/runcoms/zlogin b/runcoms/zlogin index 82f5b70..9911de5 100644 --- a/runcoms/zlogin +++ b/runcoms/zlogin @@ -16,6 +16,8 @@ # Print a random, hopefully interesting, adage. if (( $+commands[fortune] )); then - fortune -a - print + if [[ -t 0 || -t 1 ]]; then + fortune -a + print + fi fi