Fastest way - dump into PHP, use some explodes and regexps.

Most secured - App i C++ or C.

Balanced Way - JAVA app :)

W dniu 11 lipca 2010 11:46 użytkownik Mateusz Arkadiusz Mierzwinski <mateuszmierzwinski@gmail.com> napisał:
Wrote one in C,C++, Bash, Java or even PHP CLI ?? Try some... :)

This file is Bash script. Every line comes with some portion of "variable = variable data". It's realy simple. In PHP you can write simple script using explode functions or regexp's.

Good luck

2010/7/11 Amit Dor-Shifer <amitds@oversi.com>



On 07/08/10 15:13, Remy Blank wrote:
Amit Dor-Shifer wrote:
 
Can anyone recommend a tool that can parse networking info from a/m
file, so one can use it to query, e.g. what is the static IP configured
on eth0?
   
bash?

No, I'm not joking. The file is a bash script, and hence can just be
sourced by another bash script, which could then print the relevant
information in any desired format.

-- Remy

 
I'll try it out.
However, as bash doesn't know net syntax, I'd still have to go the extra-mile for stuff such as extracting IP from the config_ variable, when that also contains a netmask (e.g. CIDR notation or "netmask" definition following the ip).
Amit




--
Mateusz Mierzwiński

Bluebox Software http://www.blueboxsoft.pl/mateusz-mierzwinski



--
Mateusz Mierzwiński

Bluebox Software http://www.blueboxsoft.pl/mateusz-mierzwinski