[ale] Complex Parsing
Christopher Fowler
cfowler at outpostsentinel.com
Mon Nov 5 19:28:24 EST 2001
I'm using C. Everything is in the argv array.
I can use a serious of strcmp()'s to see is one argv[X] = "home". Then
set argv[x+1] as the argument.
I'm creating a config program the is plain language based. I can use
getopt. Getopt requires tokens. My tokes would be "home" etc..
Chris
-----Original Message-----
From: Matt Shade [mailto:mshade at threekay.com]
To: ale at ale.org
Sent: Monday, November 05, 2001 7:25 PM
To: Christopher Fowler; ale at ale.org
Subject: Re: [ale] Complex Parsing
Looks an awful lot like
useradd -d /home/jose -p cuervo jose
Seriously, if you want to use perl, you the @argv array.
If you are using C, you have the argv array.
Shell scripts, you have $0, $1, etc.
What are you using?
matt shade
www.threekay.com
----- Original Message -----
From: "Christopher Fowler" <cfowler at outpostsentinel.com>
To: ale at ale.org
To: <ale at ale.org>
Sent: Thursday, September 20, 2001 17:35
Subject: [ale] Complex Parsing
> Help. (Again)
>
> I need to do some complex parsing and need some pointers.
>
>
> Example command line:
>
>
> set user Jose home /home/jose password "cuervo"
>
>
> Basically, Jose is a key to a record.
>
> home is a command that expects the next argument to be location of home
> password is a commadn that expects next argument to be password.
>
> Someone could interchange those two arguments and it could look like this:
>
> set user Jose password "Cuervo" home /home/jose auth admin
>
> Should I uses a scanner? I there some good docs on internet for this kind
> of stuff?
>
> Chris
>
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should
be
> sent to listmaster at ale dot org.
>
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list