[tz] [PATCH 5/5] tzselect.ksh: add script mode option

Paul Eggert eggert at cs.ucla.edu
Sat Feb 13 18:19:24 UTC 2016

J William Piggott wrote:
> After the calling script receives the selected time zone, then it
> determines what to do with it and how to reply to the user. So the
> following tail dialog (after the confirmation) makes no sense:
>   ______________________________
> Is the above information OK?
> 1) Yes
> 2) No
> #? 1
> You can make this change permanent for yourself by appending the line
>          TZ='America/New_York'; export TZ
> to the file '.profile' in your home directory; then log out and log in again.
> Here is that TZ value again, this time on standard output so that you
> can use the /usr/bin/tzselect command in shell scripts:
> America/New_York
>   ______________________________
> It needs to end after the user confirms, and the calling script takes
> over from there. The tail dialog is distracting, confusing, and
> unnecessary.

Sorry, I'm not following the chronology, as the calling script cannot possibly 
receive the selected time zone until after tzselect outputs the tail dialog. So 
if the calling script knows that the user has confirmed, it can filter out any 
further stderr output it doesn't want; and if it doesn't know, it shouldn't care.

Perhaps you could give a runnable example of a calling script to illustrate the bug?

More information about the tz mailing list