X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd588,2292dba297635d44 X-Google-Attributes: gidfd588,public From: CJRandall Subject: Re: Ascii-anims Date: 1999/02/21 Message-ID: <93aaTAAWLB02Ew0u@shieldwolf.demon.co.uk>#1/1 X-Deja-AN: 446851610 X-NNTP-Posting-Host: shieldwolf.demon.co.uk:193.237.26.148 References: <36B99C28.5E2F@iNOdirect.ca> X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 919636944 nnrp-02:23978 NO-IDENT shieldwolf.demon.co.uk:193.237.26.148 Organization: me? organised? MIME-Version: 1.0 Newsgroups: alt.ascii-art.animation I replied >>> >>> Is it possible to convert java-asc-anims into shell-scripts (using printf) >>> ? >>> >>> Fabien Wernli >>> -- >>> email: wernly@dpmail.epfl.ch >>> WWW : http://come.to/fab > >[][ hi... here is an alternative... which may save you some effort... > >a simple anim-projector ... (unix terminal-independent code) > > o - tested with Bourne shell on Solaris > o - should also work using Korn shell or Bash > o - requires: tput > o - escapes: \\ \$ \" \` > >--8<-----cut-here-----8<----- >#!/bin/sh ># ># birdy - ejm ># script - cjr ># >CLEAR=`tput clear` # clear screen and home cursor >CIVIS=`tput civis` # make cursor invisible >CNORM=`tput cnorm` # make cursor normal (undo civis) >echo $CIVIS >for LOOPS in 1 2 3 4 5 6 7 8 9 >do > for FRAME in 1 2 > do > echo $CLEAR > case $FRAME in > 1) echo " " > echo " <\")" > echo " ( >\\" > echo " \" \\\\" > echo " \\ ejm" > ;; > 2) echo " " > echo " >\")" > echo " ( >\\" > echo " \" \\\\" > echo " \\ ejm" > ;; > esac > x=2 ; #### delay loop (increase=slow) > while [ $x -gt 0 ] > do > x=`expr $x - 1` > done > done >done >echo $CNORM >#exit >--8<-----cut-here-----8<----- Oooops! damn ... this don't work! the variable in the 'for' loop should be FRAME not FRAMES ... i wrote this at work during lunch and re-wrote it, without looking, from memory ...but didn't check it here :( fortunately no-one tried it ... else they'd bleat about it [ps] printf will work also if its on your machine ... but its not included in all unix distributions [][ guess i'll have to go back to double-checking everything again [][ colin -- . /\_/\ ( () |_ | |\| _/ |? .\ |\| |) .\ |_ |_ :( a a( CJRandall http://www.shieldwolf.demon.co.uk ' \___")