Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2011 09:28:53 -0400
From:      "Daniel Staal" <DStaal@usa.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Question about regular expressions
Message-ID:  <ddbcf42b4cd326ef5f2f8b85c2920529.squirrel@www.magehandbook.com>
In-Reply-To: <CANf5e8ZfbcNdkjgfBvektTe7rkOdj0P1Le7tAC59D2tunq+FAA@mail.gmail.com>
References:  <CANf5e8ZfbcNdkjgfBvektTe7rkOdj0P1Le7tAC59D2tunq+FAA@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

On Wed, July 20, 2011 10:33 pm, dave jones wrote:
> Hi,
>
> I have a config file below:
>
> $user        =   'root';           // This is the username
>
> if $user is found, I want to display root.
> Anyone knows how to programming in C or some other language? thank you.

I'm not quite sure what you are asking here.  Found where?  Display where?
 Are we just reading through the config file?  Are we processing some
other file with it's config?

It should be simple in Perl or some similar scripting language, if I knew
what you meant.  (Except for the comment, that could be a Perl file.  If
so, one way to 'process' the config file would be to execute it in your
main program, and then just use the variables assigned in it as regular
variables.)

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?ddbcf42b4cd326ef5f2f8b85c2920529.squirrel>