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

Reply via email to