Defiler un message

amine33700 -  
jisisv Messages postés 3678 Statut Modérateur -
bon soir;
#!/bin/bash

for i in 0 10 20 30 40 50 60 70 80 90 100
do
clear
echo "loading ......$i % "
done

comment faire défiler ses numero a l'affichage
merci d'avance
Configuration: Windows XP
Firefox 2.0.0.14

3 réponses

  1. lami20j Messages postés 21506 Date d'inscription   Statut Modérateur, Contributeur sécurité Dernière intervention   3 571
     
    Salut,

    par exemple
    #!/bin/bash
    
    for i in 0 10 20 30 40 50 60 70 80 90 100
    do
    clear
    echo "loading ......$i % "
    sleep 0.5
    done
    
    0
  2. amine33700
     
    MERCIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    infiniment
    0
  3. jisisv Messages postés 3678 Statut Modérateur 936
     
    Et avec des séquences ANSI, ce la paraîtra plus propre
    
    [johand@horus]~/src/bash $cat  counbter.sh
    #!/bin/sh
    BACK="\033[3D"
    echo BLAHBLAH
    echo BLIHBLIH
    
    for i in 1 2 3 5 10 20 30 40 50 100 200 300 400 500; do
            echo -n $i
            echo -ne $BACK
            sleep 2
    done
    

    Voir par exemple
    http://www.linuxselfhelp.com/howtos/Bash-Prompt/Bash-Prompt-HOWTO-6.html
    help echo; man bash

    Johan
    0