nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   Software Development (http://www.nvnews.net/vbulletin/forumdisplay.php?f=53)
-   -   Python/Pearl script... (http://www.nvnews.net/vbulletin/showthread.php?t=112865)

Tuork 05-07-08 08:04 AM

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!

ckbc 05-10-08 04:39 AM

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

Tuork 05-10-08 03:53 PM

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.


All times are GMT -5. The time now is 08:41 AM.

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