<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Display time which loops? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825068#M937982</link>
    <description>Wow...it works pretty smooth. I got 1 question, as you can see when display the time loop in my application, and at the same time i ask the user to enter an input. Will my cursor pointed at my input or at the time. Because everytime the time loops my cursor will be at the time. Just additional knowledge? Thank you.</description>
    <pubDate>Mon, 14 Oct 2002 11:40:17 GMT</pubDate>
    <dc:creator>Chua Wen Ching</dc:creator>
    <dc:date>2002-10-14T11:40:17Z</dc:date>
    <item>
      <title>Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825060#M937974</link>
      <description>How to make the current time loops in UNIX? I had done it in Cobol but i do not know whether bourne shell script can do that? Is it possible HP-UX 10.20 can perform such thing. What i meant is similar to (in windows 2000 taskbar on the right corner you can see the time running)? Any sample bourne shell script?</description>
      <pubDate>Mon, 14 Oct 2002 10:08:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825060#M937974</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T10:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825061#M937975</link>
      <description>xclock -digital -update 1&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 14 Oct 2002 10:10:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825061#M937975</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-10-14T10:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825062#M937976</link>
      <description>My org uses a dumb terminal only monochrome monitors and keyboards. The HP-UX 10.20 XWindows is not configured. There is not Windows GUI. That is why i want to create the time loop using bourne shell script. Thank you for your help. Is there other solutions?</description>
      <pubDate>Mon, 14 Oct 2002 10:20:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825062#M937976</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T10:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825063#M937977</link>
      <description>#!/usr/bin/ksh&lt;BR /&gt;#&lt;BR /&gt;while [ "1" = "1" ]; do&lt;BR /&gt;sleep 15&lt;BR /&gt;date&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Change the sleep 15 to your desired sleep time.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 14 Oct 2002 10:36:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825063#M937977</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-10-14T10:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825064#M937978</link>
      <description>Is there any sample on bourne shell rather than korn, perl or c?&lt;BR /&gt;Base on the output i get:&lt;BR /&gt;(i change sleep 1)&lt;BR /&gt;Mon Oct 14 19:28:35 SST 2002&lt;BR /&gt;Mon Oct 14 19:28:36 SST 2002&lt;BR /&gt;Mon Oct 14 19:28:27 SST 2002&lt;BR /&gt;&lt;BR /&gt;Is it possible if my time looks like this:&lt;BR /&gt;&lt;BR /&gt;Previous&lt;BR /&gt;--------&lt;BR /&gt;19:28:01 &lt;BR /&gt;&lt;BR /&gt;Current&lt;BR /&gt;--------&lt;BR /&gt;19:28:02 (1 is replace by 2 - the cursor is at 2)&lt;BR /&gt;&lt;BR /&gt;I do not want it to go to the next line. If i keep refresh the screen, will it increase the uptime and slow down my application.&lt;BR /&gt;&lt;BR /&gt;Can i refresh only a portion of a screen rather than the whole screen.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Oct 2002 10:49:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825064#M937978</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T10:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825065#M937979</link>
      <description>#!/usr/old/bin/sh&lt;BR /&gt;#&lt;BR /&gt;while [ "1" = "1" ]; do&lt;BR /&gt;tput cup 22 50&lt;BR /&gt;date&lt;BR /&gt;sleep 5&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 14 Oct 2002 10:54:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825065#M937979</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-10-14T10:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825066#M937980</link>
      <description>In the simplest form:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# Show time of day&lt;BR /&gt;while :&lt;BR /&gt;do&lt;BR /&gt;   date&lt;BR /&gt;   sleep 1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;This shows the timer/date every second. Probably not what you want. You most likely want it to appear in some corner of your display, sort of like Windows.  This is where tput will come in handy:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;# Show time of day in upper right corner&lt;BR /&gt;&lt;BR /&gt;set -u&lt;BR /&gt;PATH=/usr/bin&lt;BR /&gt;UR=$(tput cup 0 60)&lt;BR /&gt;while :&lt;BR /&gt;do&lt;BR /&gt;# various date/time formats, last one wins&lt;BR /&gt;   MYDATE=$(date '+%R')&lt;BR /&gt;   MYDATE=$(date '+%a %R')&lt;BR /&gt;   MYDATE=$(date)&lt;BR /&gt;   LEN=${#MYDATE}&lt;BR /&gt;   START=$((COLUMNS-LEN-2))&lt;BR /&gt;   UR=$(tput cup 1 $START)&lt;BR /&gt;   echo "$UR$(tput bold) $MYDATE $(tput sgr0)"&lt;BR /&gt;   sleep 1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;Now this script allows you to change the date format (3 examples are shown) and it will calculate how to position the string on the screen. I've added the bold enhancement to make the string stand out.&lt;BR /&gt;&lt;BR /&gt;This is a bit impractical since when you run it, the time/date is show OK but you can't do anything except watch the script run. If you put it in the background, it will fail because a background process is trying to write to an active terminal.&lt;BR /&gt;&lt;BR /&gt;What you want is very complicated for a standard terminal. Each time you run vi or other programs, this date program will mess up the screen. And just listing files in the shell will scroll the upper right corner off the top of the screen. But it does demonstrate how you can use tput and the Curses library.&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Oct 2002 10:56:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825066#M937980</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-10-14T10:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825067#M937981</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;============================&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;while :;do&lt;BR /&gt;echo `date "+%H:%M:%S"` '\b\b\b\b\b\b\b\b\b\c'&lt;BR /&gt;sleep 1&lt;BR /&gt;done&lt;BR /&gt;=============================&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin</description>
      <pubDate>Mon, 14 Oct 2002 10:57:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825067#M937981</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-10-14T10:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825068#M937982</link>
      <description>Wow...it works pretty smooth. I got 1 question, as you can see when display the time loop in my application, and at the same time i ask the user to enter an input. Will my cursor pointed at my input or at the time. Because everytime the time loops my cursor will be at the time. Just additional knowledge? Thank you.</description>
      <pubDate>Mon, 14 Oct 2002 11:40:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825068#M937982</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T11:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825069#M937983</link>
      <description>Just another idea if you are using 2392/hpterm compatible terminals...&lt;BR /&gt;&lt;BR /&gt;if [[ "$-" = *i* &amp;amp;&amp;amp; ( "$TERM" = hp* || "$TERM" = *2392* ) ]]; then&lt;BR /&gt;  while sleep 1; do&lt;BR /&gt;    clock=$(/usr/bin/date "+%H:%M:%S")&lt;BR /&gt;    echo "\033&amp;amp;f0a8k8d0L$clock\c"&lt;BR /&gt;    echo "\033&amp;amp;jB\c"&lt;BR /&gt;  done &amp;amp;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;This writes the time to the &lt;F8&gt; field.&lt;BR /&gt;&lt;BR /&gt;Regards...&lt;BR /&gt; Dietmar.&lt;/F8&gt;</description>
      <pubDate>Mon, 14 Oct 2002 12:10:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825069#M937983</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2002-10-14T12:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825070#M937984</link>
      <description>Hmm...sound complicated? How do i know what kind of terminal i using. I saw the monochrome monitor brand WYSE. Don't know and never heard before. I think we are using VT100. Is it similar to the terminal type you refering to?</description>
      <pubDate>Mon, 14 Oct 2002 14:15:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825070#M937984</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T14:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825071#M937985</link>
      <description>Unfortunately not... the 2392 terminals have a dedicated status/function key area at the bottom. You can use that area without disturbing the rest of your screen....&lt;BR /&gt;&lt;BR /&gt;Regards...&lt;BR /&gt; Dietmar.</description>
      <pubDate>Mon, 14 Oct 2002 14:29:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825071#M937985</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2002-10-14T14:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825072#M937986</link>
      <description>loop=1&lt;BR /&gt;while [ $loop = 1 ]&lt;BR /&gt;do&lt;BR /&gt;  clear&lt;BR /&gt;  date | awk '{print $4}'&lt;BR /&gt;  sleep 1&lt;BR /&gt;done</description>
      <pubDate>Mon, 14 Oct 2002 14:32:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825072#M937986</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2002-10-14T14:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825073#M937987</link>
      <description>Dear Dietmar Konermann, does the function key at the bottom of the terminal looks like keysh. Anyway no one yet had answer my question on if my application running the time loop and at the same time, i want the user to input data. Will the cursor point to my input or the time(loops)? Thank you.</description>
      <pubDate>Mon, 14 Oct 2002 14:40:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825073#M937987</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T14:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825074#M937988</link>
      <description>do you want to display the time in the PS1? (the prompt)?</description>
      <pubDate>Mon, 14 Oct 2002 14:50:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825074#M937988</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2002-10-14T14:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Display time which loops?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825075#M937989</link>
      <description>I think i know how to display date in my PS1. I think must specify the date command. Anyway no one yet had answer my question. If i run the time loop and also ask the end user to enter some inputs on the same time, can it be done? I tried to add some echo and read command at the end of the time loop script, but i  only manage to see the time but no echo message and read. Any solutions? Thank you.</description>
      <pubDate>Fri, 18 Oct 2002 08:13:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/display-time-which-loops/m-p/2825075#M937989</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-18T08:13:47Z</dc:date>
    </item>
  </channel>
</rss>

