On Mon, 23 Oct 2017 09:59:42 +0100, druck wrote:
> On 21/10/2017 21:04, T M Smith wrote:
>> I am sure this is elementary to most but bear with me please.
>> I am using Raspbian on a pi. How does one get a reading to print on
>> screen in the same place on a continueing basis rather than printing on
>> a new line and scrolling.
>
> I'm surprised no one has mentioned the easiest way if you have a command
> line program that displays a one off reading of 1 or more lines of text.
> Simply use the watch command (sudo apt-get install watch) to run the
> command every so many seconds, displaying the result in the same place
> on the screen.
>
> e.g. To show the CPU temperature every 1 seconds.
>
> watch -n 1 /opt/vc/bin/vcgencmd measure_temp
>
Neat, though the intervals between executions of the child process seem
to be a little random (Lenovo T440 running Fedora 25). Running
watch -n 1 date
displays the date/time with intervals of one or two seconds and the delay
doesn't always agree with the displayed interval. That said, it seems a
lot more regular with a 5 sec interval.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|