public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mateusz Arkadiusz Mierzwinski <mateuszmierzwinski@gmail.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:48:52 +0200	[thread overview]
Message-ID: <AANLkTimU-hM-93o-uuwFKUXC0YYbTPvT6oD7Wi6ho-9L@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimozC1AePqtFR4b5uluXYIcfVXx1hJ3ZE8VA90C@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1573 bytes --]

Fastest way - dump into PHP, use some explodes and regexps.

Most secured - App i C++ or C.

Balanced Way - JAVA app :)

W dniu 11 lipca 2010 11:46 użytkownik Mateusz Arkadiusz Mierzwinski <
mateuszmierzwinski@gmail.com> napisał:

> 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 <amitds@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
>



-- 
Mateusz Mierzwiński

Bluebox Software http://www.blueboxsoft.pl/mateusz-mierzwinski

[-- Attachment #2: Type: text/html, Size: 2710 bytes --]

  reply	other threads:[~2010-07-11  9:49 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
2010-07-11  9:46     ` Mateusz Arkadiusz Mierzwinski
2010-07-11  9:48       ` Mateusz Arkadiusz Mierzwinski [this message]
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=AANLkTimU-hM-93o-uuwFKUXC0YYbTPvT6oD7Wi6ho-9L@mail.gmail.com \
    --to=mateuszmierzwinski@gmail.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