Go Back   nV News Forums > Software Forums > Software Development

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-07-08, 09:04 AM   #1
Tuork
Official pain in the ass
 
Tuork's Avatar
 
Join Date: May 2003
Location: 127.0.0.1
Posts: 1,197
Send a message via MSN to Tuork
Default Python/Pearl script...

Anyone know any good starter's guide/tutorial I could look into to create a simple script that analyzes data contained in a simple 2-column text file?

Linux shell script can also work. thanks!
__________________
My avatar: "An obscure and non sensical pattern made to get people to post what they think it is" - Vamp

Dimitri:
Dell XPS M1530
Core2Duo T5550 1.86Ghz | 3GB DDR2 | 8600M GT 256MB | 250GB Hdd | BenQ FP202W 20" LCD | MX1000 mouse | Inspire T5400 5.1
Tuork is offline   Reply With Quote
Old 05-10-08, 05:39 AM   #2
ckbc
Registered User
 
Join Date: May 2008
Posts: 1
Default Re: Python/Pearl script...

you might want to look at awk or gawk commands to process texts in a set format. (it'll handle delimited and fixed space columns of text ).

e.g.
awk ' '{print $1}' file

would output the first column (assuming its white space separated )

try here for more examples
http://www.linuxfocus.org/English/Se...rticle103.html
ckbc is offline   Reply With Quote
Old 05-10-08, 04:53 PM   #3
Tuork
Official pain in the ass
 
Tuork's Avatar
 
Join Date: May 2003
Location: 127.0.0.1
Posts: 1,197
Send a message via MSN to Tuork
Default Re: Python/Pearl script...

Yeah, I had thought of awk in the beginning, but thought I could maybe use something else instead. Just wanted to keep my options open.

So far I've created a shell script that acquires the data I need from an RRD database and stores it into text files. Now I need to create an awk to process said data.

Thanks for the input.
__________________
My avatar: "An obscure and non sensical pattern made to get people to post what they think it is" - Vamp

Dimitri:
Dell XPS M1530
Core2Duo T5550 1.86Ghz | 3GB DDR2 | 8600M GT 256MB | 250GB Hdd | BenQ FP202W 20" LCD | MX1000 mouse | Inspire T5400 5.1
Tuork is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:33 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.