1 |
Wrote one in C,C++, Bash, Java or even PHP CLI ?? Try some... :) |
2 |
|
3 |
This file is Bash script. Every line comes with some portion of "variable = |
4 |
variable data". It's realy simple. In PHP you can write simple script using |
5 |
explode functions or regexp's. |
6 |
|
7 |
Good luck |
8 |
|
9 |
2010/7/11 Amit Dor-Shifer <amitds@××××××.com> |
10 |
|
11 |
> |
12 |
> |
13 |
> On 07/08/10 15:13, Remy Blank wrote: |
14 |
> |
15 |
>> Amit Dor-Shifer wrote: |
16 |
>> |
17 |
>> |
18 |
>>> Can anyone recommend a tool that can parse networking info from a/m |
19 |
>>> file, so one can use it to query, e.g. what is the static IP configured |
20 |
>>> on eth0? |
21 |
>>> |
22 |
>>> |
23 |
>> bash? |
24 |
>> |
25 |
>> No, I'm not joking. The file is a bash script, and hence can just be |
26 |
>> sourced by another bash script, which could then print the relevant |
27 |
>> information in any desired format. |
28 |
>> |
29 |
>> -- Remy |
30 |
>> |
31 |
>> |
32 |
>> |
33 |
> I'll try it out. |
34 |
> However, as bash doesn't know net syntax, I'd still have to go the |
35 |
> extra-mile for stuff such as extracting IP from the config_ variable, when |
36 |
> that also contains a netmask (e.g. CIDR notation or "netmask" definition |
37 |
> following the ip). |
38 |
> Amit |
39 |
> |
40 |
> |
41 |
|
42 |
|
43 |
-- |
44 |
Mateusz Mierzwiński |
45 |
|
46 |
Bluebox Software http://www.blueboxsoft.pl/mateusz-mierzwinski |