Wednesday, April 25, 2007

PERL sorting CSV data

This script allow us to sort CSV data by column.

The objective is to sort data by date:
The script as below:

The input file data are in CSV format:

Build_Results,Build_Type,Duration_in_Minutes,Date,Hour,Weekday
Failed,,42,01/05/2007,08,Tuesday
Failed,,20,01/02/2007,10,Tuesday
......
Failed,,22,01/03/2007,07,Wednesday

Friday, April 20, 2007

Split String using Korn Shell script



This script try to eliminate the "/" for the $variable to get each or the subdirectories.

The output of the script as below:

vobs
path
filename
vobs/path/filename

Thursday, April 12, 2007

How to Read File list and FTP over a server specific location

Last Tuesday, one of my ex-coursemate was asking me about how to create shell script. Well I did have some experience with shell script but not advance level.

He asked me to go to his home to teach him and help him up with his task. I told him I not able to teach him but able to research with him to do the
His assignment is to list all file in the specific location, and ftp over another server if any file existed.
I went to his home and spent 1.5 hours to solve the assignment. Well starting I wasted 30 minutes troubleshooting the network connection.... at the end we finally made it.

Here is the code in *.ksh Korn Shell:




@cybertech

Saturday, April 7, 2007

My First Experience with Compiling Fedore Core 6

Phew... Finally I made it! I have successfully compiled my first Linux Kernel in my life woww.. :D

Today I spent most of the time in testing the Fedora Core 6 Kernel Compile.
Before that I search for through the internet just for a better or a good guide. I found the one most useful to me (my opinion) http://www.howtoforge.com/kernel_compilation_fedora

When start following the guide and I have a perception to use my own user account instead of "root" account to compile the kernel by setting the user privillage as what the guide tutor me....

But after 5 hours testing following the tutorial.....
I finally give up and login as superuser account "root" to restart the tutorial steps. And I able to execute tutorial's commands without any errors message.

When come to compile and create rpm package step "make rpm", guess what ?!
I was exciting to wait it finish compile...... but......
I fall asleep zzzZZZZ...... waiting it to successfully compile.....

It totally taken 2.5 hours to finish compile it. Wow.... I read some blogs said they take 1.5 hours..... but mine.... > 1.5 hours... >2 hours... XD

I guess I can't compare with them. Why?!? Well......

My Fedora Core 6 actually is running as a virtual machine.... using VMplayer :P
Furthermore... I'm using a laptop...... a super slow performance laptop... ahahaa. But anyhow, it finish compiled :D

After woke up, I had my dinner and continue my final exploration to make it bootable in grub.....

I was happy when the first reboot is successful but.....
It lost the x-windows login X(...... Just left the terminal login....
I don't dare to believe it!!! What happen??!!!?....
I reboot again, this time i used different command, "reboot" instead "shutdown -r now".

The second reboot was very successful and my x-window is there...
Hoooray!!....
I hurry view the kernel version at terminal "uname -r".... Ohyess... I the kernel version I compiled... Yahoooooo!!

Well, my next step is to know how to compile "module" instead of "full" kernel.
:D wishes me success.


@cybertech