westrock2000 has asked for the wisdom of the Perl Monks concerning the following question:
Here is what I'm looking for as far as layout#!/usr/bin/perl #The \033[ stuff only works in Xterm print ("\033[2J"); #<- Clears screen print ("\033[6;0H"); #<- Repositions cursor at 6 down 0 from the left print ("Press C to continue\n"); print ("Press Q to quite\n"); do{ print ("\033[s"); #<-- Saves Cursor Position print ("\033[3;6H",`date`); #<-- Puts date and time above "Press C + to continue" print ("\033[u"); #<-- Restores Cursor Position }until (exists $input[0]); if ( $input eq Q ){ exit; }
Other then not knowing how to get $input entered, this sort of does what I want, except that you can tell that its drawing the screen over and over because the cursor moves back and forth.May 21 22:00 Press C to continue Press Q to quite
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I have a running clock within a script in Xterm?
by Utilitarian (Vicar) on May 22, 2010 at 07:03 UTC | |
|
Re: Can I have a running clock within a script in Xterm?
by flipper (Beadle) on May 22, 2010 at 16:49 UTC |