Thanks to visit codestin.com
Credit goes to corecode.wordpress.com

Feeds:
Posts
Comments

Archive for April, 2012

This will be my first double language post -_-“,  this moment and beyond I would like to write here more and more in english, just because I really need improve this skill. So, let’s go.

I was take a look around my favourite sites and one this is  all commands lines, a very awesome site that their users can post all kind of command line for shell unix. Then, I saw this set of commands :
paste <(seq 7 | shuf | tr 1-7 A-G) <(seq 7 | shuf) | while read i j; do play -qn synth 1 pluck $i synth 1 pluck mix $2; done.

This giant command line make your sound card play some random sounds. But,  it was not because that I wanted post this stuff. My goal here is show to you that with a simple fun you can learn many things that in the future can become very useful to you.
Let’s see this. I separeted some commands of this line, like: tr, shuf and seq. The first can translate a character or number, a set in another set. Some like this. tr “1-7” “A-Z” , and 1.2.3.4… become A,B..C… The shuf command exchange you output and lastly seq generate a chain.

Now, put your brain to think and do amazing stuff with this little and likely naive knowledge. =P.
————————————————————————————————————————————————————-
Passeando pelos meus sites favoritos, um deles o all command lines, que permite aos seus usuários postar todo tipo de comando a ser executado no shell do unix, me deparei com a seguinte e gigante linha.
paste <(seq 7 | shuf | tr 1-7 A-G) <(seq 7 | shuf) | while read i j; do play -qn synth 1 pluck $i synth 1 pluck mix $2; done 

Este conjunto de comandos faz com que sua placa de som emita algumas notas musicais de forma randômica. Mas este não é o ponto deste pots. Eu, na verdade,queria mostrar para vocês que até aquelas coisas que são provavelmente bestas podem ser interessantes se analisadas. Separando três comandos que aparecem na linha citada temos: tr, shuf e seq. O primeiro “traduz” um conjunto de entrada em outro conjunto. Já o segundo faz uma permutação de uma dada sequência e o último, seq, gera uma sequência para você.

Agora, coloquem seus cérebros para trabalhar e tentem brincar com isso ;P.  E lembrem-se, nem sempre o que parece inútil é realmente inútil…”esprema uma laranja e ela te dará um suco”.

Read Full Post »

Design a site like this with WordPress.com
Get started