View Full Version : Python/Pearl script...

05-07-08, 08:04 AM
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!

05-10-08, 04:39 AM
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 ).

awk ' '{print $1}' file

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

try here for more examples

05-10-08, 03:53 PM
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.