Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art, 3 Nov 2000.
Re: ascii clocks

Re: ascii clocks

Russell Marks <russell.marks@spam^H^H^H^Hntlworld.com> wrote in message
news:vMWL5.933$5j5...@news6-win.server.ntlworld.com...
> Fau...@home.com (Faux_Pseudo) wrote:
>
> > --(Once apon a time, in alt.ascii-art,)--
> > --(Todd Vargo said it like only they can.)--
> > >
> > >That's the functionality I was referring to. You don't want to
(shouldn't)
> > >clear the entire screen (unless the clock will be hovering like a
> > >screensaver clock, you didn't say). My qb code only changes the digit
that
> > >actually changed in the array, then prints only the time again. Oh
well, I
> > >tried helping.
>
> Perhaps an analogy would help - programming in bash is a little bit
> like writing DOS batch files, only bash is far more powerful and has
> proper programming language features (control structures and the
> like). Still, cursor movement is awkward in bash.

Would you like to see this in a fully functioning batch file? Yep, I had to
do it. Only took 2 days of spare time. The zip including a face and
character set and the batch files is only 2KB.

>
> > and there is a way to use the trick you are talking about in bash
>
> tput?
>
> > now the time function works right now but i need to rewrite part of it
> > becase the time prints like
> >  2222
> > 22  22
> >    22
> >   22
> >  222
> > 222222
> [vertically-printing one digit after another mostly cut]
> >  9999
> > 99  99
> >  9999
> >    99
> >   99
> >  99
> >
> > instead of the corect horazontal out put
>
> Probably the best thing to do if you insist on doing this in bash (and
> I have to say that's an amazingly perverse thing to do it in :-)) is
> to output the digits to separate temporary files (when you start up
> the clock program, preferably) and use `paste' to put them together.
> For example, with files `2' and `9' as above:
>
> rus@cartman:2147:/home/rus/tmp>paste 2 9
>  2222    9999
> 22  22  99  99
>    22    9999
>   22       99
>  222      99
> 222222   99

Whoa, you can paste side by side? Oh well, the syntax don't help me any way.

>
> (You could also make a temp file containing the necessary
> cursor-positioning control codes, and list that first in the paste
> command-line.)
>
> You might also want to look into using `trap' to clean up any such
> temporary files on e.g. ^C. The basic idea would be to do something
> like this before writing any of the files:
>
> trap 'rm -f files_to_delete' 0 1 3 15
>
> (Obviously wildcards and variables are ok in the `rm' too.)
>
> ObASCII: one I did a few years back for a ZX Spectrum manual
> transcription, which seems appropriately `techie' for this post... :-)
>
>                                   | y-axis
>                                   |
>                     cosine of a = COS a <-__
>                                ___|_|_      --_   a
>                            __--   |_v_-+__     -_
>                          _-       |   /|  -_     \
>                         /         |  / |    \     \
>                        /          | /  |<-+  \     |
>                       |           |/   |  |   |    |
>             ----------+-----------+-------|---+-----------
>                       |           |       |   |\     x-axis
>                       :\ sine of a = SIN a   /  \
>                       : \_        |        _/    \
>                       :   --__    |    __--       \
>                       :       ----+----             starting
>                       :           |                 position
>                       <-radius=1 ->
>                                   |
>                                   |
> -Rus.

--
Todd Vargo (body of msg must contain my name to reply)

Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f996b,dd72bd170144bb61
X-Google-Attributes: gidf996b,public
From: "Todd Vargo" <t...@birdlover.com>
Subject: Re: ascii clocks
Date: 2000/11/03
Message-ID: <8u02ad$dn5j$1...@ID-25025.news.dfncis.de>#1/1
X-Deja-AN: 689486673
References: <slr...@faux.local.net> <8taab1$guv$1...@neptunium.btinternet.com> <slr...@cx743464-a.fed1.sdca.home.com> <8tgvn4$n61r9$1...@ID-25025.news.dfncis.de> <slr...@faux.local.net> <8tk3u3$n4hgo$1...@ID-25025.news.dfncis.de> <slr...@faux.local.net> <vMWL5.933$5j5...@news6-win.server.ntlworld.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
X-Trace: fu-berlin.de 973311121 449715 4.54.196.71 (16 [25025])
X-MSMail-Priority: Normal
Newsgroups: alt.ascii-art

Related ASCII art in the Gallery

Explore these categories from our collection of 11,000+ artworks:

About this message. This message was posted publicly to the newsgroup alt.ascii-art in 2000 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post