Wednesday, August 30, 2006

Blender and "Elephants Dream"

You probably know Google Video: this is an excellent animation film you can find on Google Video: Elephants Dreams

What is at stake with this small cartoon is that it was entirely created with free software: like Blender… Thus if you feel the heart of Tim Burton, enjoy Blender.
Regarding Elephants Dream, my opinion is that all the machine is in the head of the young person and that the old man is there to only try to maintain this beautiful machine. In fact he know that it can be realized only by maintaining the young person in the belief of the machine… If you have divergent opinions: leave a post; -)

Sunday, August 20, 2006

[Some Thinks about everything] Linux:: Qemu and the mouse

I had problems where the mouse would stick at the bottom right-hand corner, becoming unusable. A solution to this is before you run qemu, type in your terminal this command:


Now you can play with your virtual machines

Posted by ServalX02 to Some Thinks about everything at 8/20/2006 01:09:00 PM

[Some Thinks about everything] Linux:: Yakuake

Do you know this tool? I have used it a long time now and it is totally amazing. I have never to use again konsole. Only press F12 and you have your Terminal:
you can configure its height, its weight, you can have several terminal in the same time. This is very useful: I recommend it to any geek

Posted by ServalX02 to Some Thinks about everything at 8/20/2006 11:44:00 AM

Thursday, August 10, 2006

[Some Thinks about everything] Linux:: AWK

Imagine that you have an huge, huge file, organized with columns, like that:

Class Top_Searches Num_Search

1. Heathrow 34521
2. Meebo 34478
3. Buffett and Hezbollah 23442
4. London 21354
5. Lieberman 16532
6. Lebanon 15342
7. Icalendar 15234
8. Israel 12345
9. Video 9877
10. Terror 8532
11. Deceit Beyond 5679
12. Adnan Hajj 4568
13. Apple 3467
14. Terrorism 2345
15. Terror Plot 2123

If you want only to displays the first and third columns, it seems impossible... Actually, only for a windows user, because Linux or Unix
have a powerful tool to manipulate those file. One year ago, my girl friend had a huge huge file, a bit like that for
a study about obesity, she tried to opened it with excel... But excel freezed becquse the file was too big... So she asked me
for a solution: I did all she wanted only by using command line tools and espescially awk! So now some example to measure the
power of awk. The awk command is as you have already probably understood a power pattern matching language that allows you to modify input lines by manipulating the fields they contain.

$ awk '{print}' file.txt

This has the same result as $ cat file.txt, it displays all the content of the file

$ awk '\toto\' file.txt

This has the same result as $ grep Heathrow file.txt, it displays only line which content the word Heathrow.

$ awk '\Lieberman\ {print $5,$7,$12}' file.txt

It only displays columns 5, 7 and 12 of line containing "Lieberman"

$ awk '{if ($3 <>

It displays columns 3 and 7 if the key 3 is less than 2000.

$ awk -F":" '{ print $3 "\t" $1 }' /etc/passwd |sort -g

Display user by increasing userid. Notice that if you want to print a tabulation you've to use \t, idem if you want print a new line, use \n.

$ awk -F"\t" '{ print $4 "\t" $10 }' file.txt

You can specified the separator with the command -F"\t" (notice that tabulation and space are the default one)

And this is only the beginning with some file, where you use a end line to separate data and a some sign like @ to separate
a group of data,
you can use awk to retrieve some informations:

$ awk ' BEGIN { RS="^"; FS="\n" } /London/ ' file.txt

This kind of command permit you to process file like this one:

Airport: Heathrow
Bus: First

Airport: Charles de Gaulle

Incredible isn't it. Some other links to improve your "awk" skills:

A Guided Tour Of Awk

The GNU Awk User's Guide

Getting started with awk

How to Use AWK

UNIX Utilities - awk

Awk Tutorial

Awk and shell


Introduction to akw

Awk et bash

IBM developer's work

String manipulations

AWK: The Linux Administrators' Wisdom Kit

Introduction to (g)awk

Gawk Chapter 1

Posted by ServalX02 to Some Thinks about everything at 8/10/2006 09:23:00 PM

Wednesday, August 09, 2006

[Some Thinks about everything] Linux:: join

How to join files, which have a common key?
Example :

File t1 :

Row Search Number_Hit
1. Lieberman 60853
2. Adnan Hajj 40642
3. Icalendar 30674
4. Meebo 26389
5. Lamont 26321
6. Buffett 25321
7. Video 19532
8. Aol Search 18344
9. Lebanon 16532
10. Israel 15342
11. Wwdc 11453
12. Cynthia 10567
13. McKinney 9674
14. Ned Lamont 8334
15. Photo 7653

File t2 :

Row Tags
1. Israel
2. Lebanon
3. War
4. Hezbollah
5. lieberman
5. Microsoft
6. leberman
7. AOL
8. ned lamont
9. wordpress
10. Windows
11. Iraq
12. Sex
13. Bush
14. Middle
To compare and join the key 2 of the file 1 (this is the signification of the argument -1 2)
with the key 1 of the file 2.

$ join -1 1 -2 1 techno_1 techno_2

Row Search Number_Hit Tags
1. Lieberman 60853 Israel
2. Adnan Hajj 40642 Lebanon
3. Icalendar 30674 War
4. Meebo 26389 Hezbollah
5. Lamont 26321 lieberman
5. Lamont 26321 Microsoft
6. Buffett 25321 leberman
7. Video 19532 AOL
8. Aol Search 18344 ned lamont
9. Lebanon 16532 wordpress
10. Israel 15342 Windows
11. Wwdc 11453 Iraq
12. Cynthia 10567 Sex
13. McKinney 9674 Bush
14. Ned Lamont 8334 Middle
Interesting isn'it?
I hope it could help you, in fact this is not the best example, I know but if you were seqrching how to concatenate two files this is the tool you need, and I've just give you the syntax. I hope it will be helpful

Posted by ServalX02 to Some Thinks about everything at 8/09/2006 08:33:00 PM

Monday, August 07, 2006

[Some Thinks about everything] Linux:: Presentation of the command SORT

You want to write some shell script, this link should teach you everything you should know

Let me introduce you to a fabulous tool: sort. Just an example of marvelous things you can do by using it:
Let be the file techno.txt

1 £.34 Adnan Hajj
2 £.45 Wwdc
3 £.35 Reuters
4 £.10 Lebanon
5 £.500 Apple
6 £.39 Aol Data
7 £.1 Mel Gibson
8 £.1000 Israel
9 £.27 Video
10 £.3 Intimations of Recession
11 £.67 Lollapalooza
12 £.345 Erik
13 £.675 Wordcamp
14 £.876 Flavor of Love
15 £.56 Joe Francis

Sort price:

$ sort -n -t. -k2 techno.txt

7 £.1 Mel Gibson
10 £.3 Intimations of Recession
4 £.10 Lebanon
9 £.27 Video
1 £.34 Adnan Hajj
3 £.35 Reuters
6 £.39 Aol Data
2 £.45 Wwdc
15 £.56 Joe Francis
11 £.67 Lollapalooza
12 £.345 Erik
5 £.500 Apple
13 £.675 Wordcamp
14 £.876 Flavor of Love
8 £.1000 Israel

Now a quick explaination of the syntax:

-n numerical
-t. separator: the dot
-k key

It's enough for today, play with it create your own files, if you have a problem let me know I will be glad to help you

Posted by ServalX02 to Some Thinks about everything at 8/07/2006 09:11:00 PM

[Some Thinks about everything] Linux:: How to become a Linux Guru

Start reading those documentations, they are very useful, even if you use an Ubuntu or another distribution, which hide all the possibilities of a Linux... Ready?
Introduction to Linux
To understand what a process is
A lot of information, a treasurebut made in France

How to install a Mandriva(english)
Linux Newbie Administrator Guide
Linux shorcuts and commands
The Linux documentation Project
The diary of a linux newbie
Tips and Tricks for Linux(french)
Installation of a Debian system(french)
Network: NAT(the best explanation I have ever found)
Peter Scott's Unix, Linux and X Notes
Teach yourself HTML, XHTML, SQL, XML

Posted by ServalX02 to Some Thinks about everything at 8/07/2006 09:00:00 PM