1 |
On 07/08/10 15:13, Remy Blank wrote: |
2 |
> Amit Dor-Shifer wrote: |
3 |
> |
4 |
>> Can anyone recommend a tool that can parse networking info from a/m |
5 |
>> file, so one can use it to query, e.g. what is the static IP configured |
6 |
>> on eth0? |
7 |
>> |
8 |
> bash? |
9 |
> |
10 |
> No, I'm not joking. The file is a bash script, and hence can just be |
11 |
> sourced by another bash script, which could then print the relevant |
12 |
> information in any desired format. |
13 |
> |
14 |
> -- Remy |
15 |
> |
16 |
> |
17 |
I'll try it out. |
18 |
However, as bash doesn't know net syntax, I'd still have to go the |
19 |
extra-mile for stuff such as extracting IP from the config_ variable, |
20 |
when that also contains a netmask (e.g. CIDR notation or "netmask" |
21 |
definition following the ip). |
22 |
Amit |