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 <ami...@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

Reply via email to