public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Amit Dor-Shifer <amitds@oversi.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: OT: tool for reading /etc/conf.d/net?
Date: Sun, 11 Jul 2010 11:43:21 +0300	[thread overview]
Message-ID: <4C398429.7070107@oversi.com> (raw)
In-Reply-To: <i14fe8$hsu$1@dough.gmane.org>



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	other threads:[~2010-07-11  8:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08 12:06 [gentoo-user] OT: tool for reading /etc/conf.d/net? Amit Dor-Shifer
2010-07-08 12:13 ` [gentoo-user] " Remy Blank
2010-07-11  8:43   ` Amit Dor-Shifer [this message]
2010-07-11  9:46     ` Mateusz Arkadiusz Mierzwinski
2010-07-11  9:48       ` Mateusz Arkadiusz Mierzwinski
2010-07-11 17:26         ` Kyle Bader
2010-07-11 17:59           ` Alan McKinnon
2010-07-09 17:37 ` James
2010-07-11  7:22   ` Amit Dor-Shifer
2010-07-13  2:11 ` [gentoo-user] " Iain Buchanan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C398429.7070107@oversi.com \
    --to=amitds@oversi.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox