On Feb 18, 2009, at 12:29 PM, GESBBB wrote:
I am a little confused. I believe the problem is with the "if [ ! -t
0 ]" statement. I tried to redirect the error message; however, it
still appears in the email sent by CRON. I tried using this
statement instead: if ( ! tty -s &> /dev/null ) and "if ( ! tty -s )
&> /dev/null"; however, they also produce an error message although
the function does work correctly. Is this just something I should
just ignore, or is there a way to stop the message from being sent
in the CRON report?
For Bourne shell, classic /bin/sh, and related shells (zsh, ksh), you
can use something like:
case $- in
# do stuff for an interactive shell
# not interactive
echo "not interactive"
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"