shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Mensagem


From: Jeferson Santos
Subject: Re: [shell-script] Mensagem
Date: Sat, 12 Dec 2009 19:06:39 -0200

Julio, Na linha 43 precisa de uma #

Muito legal mesmo, valew
Abraços,
Jeferson




2009/12/12 Julio C. Neves <address@hidden>

>
>
> Olá amigos da lista Shell,
> peço que vcs copiem o prg a seguir para um arquivo e o execute. Esses são
> os
> meus votos para os amigos desta fantástica lista.
>
> Abraços,
> Julio
> Cursos de Shell e Zenity em 2 fins de semana?
> - Em DF ligue (61) 3223-3000 Curso de zenity 09-10/01;
> - Turmas fechadas em outras cidades ligue (21) 8112-9988.
>
> #!/bin/bash
> # Versão 2009
> trap "tput reset; tput cnorm; exit" 2
> clear
> tput civis
> lin=2
> col=$(($(tput cols) / 2))
> c=$((col-1))
> est=$((c-2))
> cor=0
> tput setaf 2; tput bold
> # Montando a Árvore
> for ((i=1; i<20; i+=2))
> {
> tput cup $lin $col
> for ((j=1; j<=i; j++))
> {
> echo -n \*
> }
> let lin++
> let col--
> }
> tput sgr0; tput setaf 3
> for ((i=1; i<=2; i++))
> {
> tput cup $((lin++)) $c
> echo 'mWm'
> }
> tput setaf 1; tput bold
> tput cup $lin $((c - 4)); echo BOAS FESTAS
> tput cup $((lin + 1)) $((c - 11)); echo E muito suSHELLso em 2010
> let c++
> k=1
> # Pendurando as bolas (da árvore, claro!)
> while true; do
> for ((i=1; i<=35; i++))
> {
> # Apagando a bola que foi ligada há 25 rodadas atras
> [ $k -gt 1 ] && {
> tput setaf 2; tput bold
> tput cup ${linha[$[k-1]$i]} ${coluna[$[k-1]$i]}; echo \*
> unset linha[$[k-1]$i]; unset coluna[$[k-1]$i] # Mantenha limpo
> o vetor
> }
> li=$((RANDOM % 9 + 3))
> ini=$((c-li+2))
> fim=$((c+li+2))
> co=$((RANDOM % (li-2) * 2 + 1 + ini))
> tput setaf $cor; tput bold # Troca cor das bolas
> tput cup $li $co
> echo o
> linha[$k$i]=$li
> coluna[$k$i]=$co
> cor=$(((cor+1)%8))
> # sleep 0.05
> sh=1
> for l in S H E L L
> do
> tput cup $((lin+1)) $((c-3+sh))
> echo $l
> let sh++
> sleep 0.01
> done
> }
> k=$((k % 2 + 1))
> done
>
> [As partes desta mensagem que não continham texto foram removidas]
>
>  
>



-- 
Abraços,
Jeferson Santos


[As partes desta mensagem que não continham texto foram removidas]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]