Sponsored Content
Full Discussion: While loop animation
Top Forums Shell Programming and Scripting While loop animation Post 302623553 by agama on Friday 13th of April 2012 08:07:22 PM
Old 04-13-2012
In ksh or bash, something like this what you are wanting?

Code:
for (( i = 0; i < 30; i++ ))
do
    printf "."
    sleep 1
done
printf "\n"

The printf, without the \n, does not write a newline, so the next dot is placed on the same line as the previous. One final newline to make it nice when the script exits.
 

8 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Graphics And Animation

DOES ANYBODY KNOW WHY C OR ANY OTHER UNIX LANGUAGE IS USED IN THREE DIMENSIONAL ANIMATION AND RENDERING (5 Replies)
Discussion started by: aloysius1001
5 Replies

2. UNIX Desktop Questions & Answers

3d animation

What are the benefits to using UNIX for 3d animation. I am looking into the field, and most places require a strong background in UNIX. Why is this? (3 Replies)
Discussion started by: aloysius1001
3 Replies

3. What is on Your Mind?

unix.com Flash animation

I realy Love the look of the Flash animation at top of the forum, very sweet. But it uses all of my cpu power :( even winamp starts getting little skips. Then i have to scroll down and hide the nice animation :( Maybe someone could try to tune it a little bit. Thats on a 1,6 Ghz... (0 Replies)
Discussion started by: Lazzar
0 Replies

4. UNIX for Dummies Questions & Answers

script animation

I have read hundreds of the postings and cannot find the answer to my question...so I hope that someone is able to answer it for me. I am writing a script in bash, and would like to add animation. I have a gif file that I would like to open and have displayed on the screen. Can this be done? Of... (0 Replies)
Discussion started by: debit
0 Replies

5. Shell Programming and Scripting

Shell Script Animation

Hi, I want to write a shell script which can do some animation The animation is as follows it is like a progress barwhich hould gone on inresing with time & at the end of the line there should be the progess Eg == - 10%... (2 Replies)
Discussion started by: wojtyla
2 Replies

6. Shell Programming and Scripting

Gnuplot shell script controlled animation

Hi, I am looking for basic shell script to feed Gnuplot with live data, to arrange basic animation. I mean one-liner one variable real function. Any idea or experiences from the past, generating Gnuplot animation on dumb terminal (ASCII only) ? Or please refer me to a nice web site. ... (7 Replies)
Discussion started by: darius2
7 Replies

7. What is on Your Mind?

Forum Description Animation with jQuery

I found that the pages that lists all the forums were too cluttered with the forum descriptions, so I added a bit of jQuery to hide the forum descriptions and to fade them in and out on mouseover: <script> $(document).ready(function() { jQuery(".neo-forum-description").hide();... (2 Replies)
Discussion started by: Neo
2 Replies

8. What is on Your Mind?

Loading Animation for Large Man Page Repositories

Should have done this 10 years ago, so better late than never: Just added a "loading" animation to the the man page repositories when they load, especially since some are very large and take many seconds to load. See for example: https://www.unix.com/man-page-opensolaris-repository.php ... (1 Reply)
Discussion started by: Neo
1 Replies
CONS(9) 						   BSD Kernel Developer's Manual						   CONS(9)

NAME
cnbell, cnflush, cngetc, cngetsn, cnhalt, cnpollc, cnputc -- console access interface SYNOPSIS
#include <dev/cons.h> void cnbell(u_int pitch, u_int period, u_int volume); void cnflush(void); int cngetc(void); int cngetsn(char *cp, int size); void cnhalt(void); void cnpollc(int on); void cnputc(int c); DESCRIPTION
These functions operate over the current console device. The console must be initialized before these functions can be used. Console input polling functions cngetc(), cngetsn() and cnpollc() are only to be used during initial system boot, e.g., when asking for root and dump device or to get necessary user input within mountroothooks. Once the system boots, user input is read via standard tty(4) facili- ties. The following is a brief description of each function: cnbell() Ring a bell at appropriate pitch, for duration of period milliseconds at given volume. Note that the volume value is ignored com- monly. cnflush() Waits for all pending output to finish. cngetc() Poll (busy wait) for an input and return the input key. Returns 0 if there is no console input device. cnpollc() must be called before cngetc() could be used. cngetc() should be used during kernel startup only. cngetsn() Read one line of user input, stop reading once the newline key is input. Input is echoed back. This uses cnpollc() and cngetc(). Number of read characters is size at maximum, user is notified by console bell when the end of input buffer is reached. <Backspace> key works as expected. <@> or <CTRL>-u make cngetsn() discard input read so far, print newline and wait for next input. cngetsn() returns number of characters actually read, excluding the final newline. cp is not zero-ended before return. cngetsn() should be used during kernel startup only. cnhalt() Terminates the console device (i.e. cleanly shuts down the console hardware.) cnpollc() Switch the console driver to polling mode if on is nonzero, or back to interrupt driven mode if on is zero. cnpollc() should be used during kernel startup only. cnputc() Console kernel output character routine. Commonly, kernel code uses printf(9) rather than using this low-level interface. EXAMPLES
This waits until a <Enter> key is pressed: int c; cnpollc(1); for(;;) { c = cngetc(); if ((c == ' ' || (c == ' ')) { printf(" "); break; } } cnpollc(0); SEE ALSO
pckbd(4), pcppi(4), tty(4), wscons(4), wskbd(4), printf(9), spl(9), wscons(9) BSD
June 8, 2010 BSD
All times are GMT -4. The time now is 09:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy