Pular para o conteúdo

Comando for seq [RESOLVIDO]

Responder tópico
O Viva o Linux depende da receita de anúncios para se manter. Ative os cookies aqui para nos patrocinar.
Não conseguimos carregar os anúncios. Se usa bloqueador, considere liberar o Viva o Linux para nos patrocinar.
  • Denunciar
  • Indicar

1. Comando for seq [RESOLVIDO]

Enviado em 26/10/2011 - 13:28h

Pessoal boa tarde...

Gostaria de fazer uma lista utilizando o comando For, porém gostaria de fazer esta lista decrescente.

150
149
148
....

Valeu

Responder tópico

O Viva o Linux depende da receita de anúncios para se manter. Ative os cookies aqui para nos patrocinar.
Não conseguimos carregar os anúncios. Se usa bloqueador, considere liberar o Viva o Linux para nos patrocinar.

2. Re: Comando for seq [RESOLVIDO]

Enviado em 26/10/2011 - 14:30h

Se for usar o bash, você pode tentar assim:


for i in {150..1}
do
echo $i
done


Já se quiser um código que funcione em qualquer shell (menos csh):


i=150
while [ $i -ne 0 ]
do
echo $i
i=`expr $i - 1`
done



3. Re: Comando for seq [RESOLVIDO]

Enviado em 18/06/2015 - 23:29h


seq 150 1


4. Re: Comando for seq [RESOLVIDO]

Enviado em 18/06/2015 - 23:39h

tonyhts escreveu:


seq 150 1



Aqui funcionou com

seq 150 -1 1 


--
Encryption works. Properly implemented strong crypto systems are one of the few things that you can rely on. Unfortunately, endpoint security is so terrifically weak that NSA can frequently find ways around it. — Edward Snowden

5. Re: Comando for seq [RESOLVIDO]

Enviado em 24/06/2015 - 14:53h

listeiro_037 escreveu:

tonyhts escreveu:


seq 150 1



Aqui funcionou com

seq 150 -1 1 


--
Encryption works. Properly implemented strong crypto systems are one of the few things that you can rely on. Unfortunately, endpoint security is so terrifically weak that NSA can frequently find ways around it. — Edward Snowden


Boa!

Putz agora que eu vi que a postagem inicial era de 2011.. rsrs Vc tinha percebido?


6. Re: Comando for seq [RESOLVIDO]

Enviado em 24/06/2015 - 18:22h

tonyhts escreveu:

listeiro_037 escreveu:

tonyhts escreveu:


seq 150 1



Aqui funcionou com

seq 150 -1 1 


--
Encryption works. Properly implemented strong crypto systems are one of the few things that you can rely on. Unfortunately, endpoint security is so terrifically weak that NSA can frequently find ways around it. — Edward Snowden


Boa!

Putz agora que eu vi que a postagem inicial era de 2011.. rsrs Vc tinha percebido?



Não. http://www.aesica.net/random/thread-necromancy.png

--
http://s.glbimg.com/po/tt/f/original/2011/10/20/a97264_w8.jpg

Encryption works. Properly implemented strong crypto systems are one of the few things that you can rely on. Unfortunately, endpoint security is so terrifically weak that NSA can frequently find ways around it. — Edward Snowden

7. Re: Comando for seq [RESOLVIDO]

Enviado em 24/06/2015 - 19:13h

listeiro_037 escreveu:

tonyhts escreveu:

listeiro_037 escreveu:

tonyhts escreveu:


seq 150 1



Aqui funcionou com

seq 150 -1 1 


--
Encryption works. Properly implemented strong crypto systems are one of the few things that you can rely on. Unfortunately, endpoint security is so terrifically weak that NSA can frequently find ways around it. — Edward Snowden


Boa!

Putz agora que eu vi que a postagem inicial era de 2011.. rsrs Vc tinha percebido?



Não. http://www.aesica.net/random/thread-necromancy.png

--
http://s.glbimg.com/po/tt/f/original/2011/10/20/a97264_w8.jpg

Encryption works. Properly implemented strong crypto systems are one of the few things that you can rely on. Unfortunately, endpoint security is so terrifically weak that NSA can frequently find ways around it. — Edward Snowden


Huahsushauhsuahsua . vdd


Responder tópico

O Viva o Linux depende da receita de anúncios para se manter. Ative os cookies aqui para nos patrocinar.
Não conseguimos carregar os anúncios. Se usa bloqueador, considere liberar o Viva o Linux para nos patrocinar.

Responder tópico

Entre na sua conta para responder.

Fazer login para responder