> >> Where I want output, I protect it with:
> >>
> >>     [ -n "$PS1" ] && printf …
> >
> > Maybe consider:
> >
> >     [[ -t 1 ]] && printf ...
> 
> Until your script that was started via crontab silently fails.  I
> *like* always having error messages enabled.

I like logs too but -t was in the spirit of -n $PS1, only slightly more robust,
I think.

Reply via email to