Results 1 to 7 of 7
hi everyone,
i do work interview and thay gave me a exercise on linux.
i dont have a clue in linux.
please please help me i need help!
this is ...
- 05-16-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 3
parse log file-please help
hi everyone,
i do work interview and thay gave me a exercise on linux.
i dont have a clue in linux.
please please help me i need help!
this is the exercise :
structure:
id,name,title,cate,type,phone
in this file 12345.log have 1000 records (3 in the example)
2312323¶dan¶sport¶20¶65¶089-827266
1234323¶ram¶newss¶19¶65¶049-827266
1234323¶sami¶nana¶19¶65¶023-827266
a.from the file 12345.log need to show only the records in name "dan"
b.from the file 12345.log need to show only records name = dan and title=sport
tnx alot!!
- 05-16-2008 #2
hi,
im not sure the forum rules allow us to do this for you but since you might be in a hurry i will do it for you(am i going to jail tonight)
a)
replace the s after -F by the separator in the file. here i cant see the correct separator character.Code:awk -Fs '{if($2 == "dan") print}' 12345.log
b)
Code:awk -Fs '{if($2 == "dan" && $3 == "sport") print}' 12345.logLinux and me it's a love story
- 05-18-2008 #3Just Joined!
- Join Date
- May 2008
- Posts
- 3
Tnx Alot
tnx!!!
i love u!
- 05-18-2008 #4Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
Do you think the job is right for you if it requires Linux experience and you "don't have a clue in linux"?
- 05-18-2008 #5
scm i dont think that the job requires Linux experience because if it was the case they wouldnt give him/her such an easy test.
Linux and me it's a love story
- 05-18-2008 #6Just Joined!
- Join Date
- May 2008
- Posts
- 3
this job don't need Linux experience.
i am a .NET C# Programmer.
this was one question from ten..
thanks a lot!
- 05-18-2008 #7
you welcome
as a programmer some Unix/Linux experience will really broaden you chances (IMHO).Linux and me it's a love story


Reply With Quote