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

J William Piggott elseifthen at gmx.com
Sat Feb 13 17:40:27 UTC 2016


On 02/13/2016 02:16 AM, Paul Eggert wrote:
>J William Piggott wrote:
>> To do so there needs to be a way to silence the
>> dialog tail.
>
>Sorry, I don't see why the dialog tail needs to be silenced. It's sent
>to stderr, just like all the other stderr messages (which also don't
>need to be silenced). A script that wants to capture the resulting zone
>should capture just stdout.

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.




More information about the tz mailing list