How to pass parameters from the UNIX command line ?

2003-08-14 Thread Fabián R. Breschi
Dear List,

It seems a silly one, anyway I'm somewhat confused about how to pass 
parameters from the UNIX command line:

Suppose I have my working PERL script and passed parameter on an URL as:

http://server.domain.com/cgi-bin/MyProcedure.pl?cust_id=x

I'd like to make a cron job to source the above PERL script as from the 
command line to resemble something like:

perl /usr/local/apache/cgi-bin/MyProcedure.pl   << need to pass the 
parameter here as cust_id=x

How can I tell the procedure to consider cust_id=x as it's input ?

Many thanks indeed for your patiente.

Fabian.



Re: How to pass parameters from the UNIX command line ?

2003-08-09 Thread Fabián R. Breschi
Thanks to everybody,

I have opted for using libwwwperl which it looks like to be the more 
straightforward method to use CL commands into cron jobs with GET or 
lwp-download.

Fab.



Re: How to pass parameters from the UNIX command line ?

2003-08-09 Thread Jean-Sebastien Guay
> > http://server.domain.com/cgi-bin/MyProcedure.pl?cust_id=x
> >
> > I'd like to make a cron job to source the above PERL script as from
> > the command line to resemble something like:
> >
> > perl /usr/local/apache/cgi-bin/MyProcedure.pl   << need to pass the
> > parameter here as cust_id=x
>
> [...]
> Or use GET from the commandline with the uri behind it. This
> makes it a proper request to your webserver, issued from the command-
> line (or crontab in this case).

Or 'lynx -source
http://server.domain.com/cgi-bin/MyProcedure.pl?cust_id=x'

J-S

___
Jean-Sébastien Guay  [EMAIL PROTECTED]
Software Developer, Hybride http://www.hybride.com
Piedmont, Québec, Canada




RE: How to pass parameters from the UNIX command line ?

2003-08-08 Thread Frank Maas
 
> http://server.domain.com/cgi-bin/MyProcedure.pl?cust_id=x
> 
> I'd like to make a cron job to source the above PERL script as from
> the command line to resemble something like:
> 
> perl /usr/local/apache/cgi-bin/MyProcedure.pl   << need to pass the
> parameter here as cust_id=x 

I am very doubtful if running a mod_perl script from the commandline
would make any sense... There is no Apache:: in that context to name
something. You could do something tacky with Apache::FakeRequest, but
it's far better to write a proper, not web-tuned, script to do the
chore. Or use GET from the commandline with the uri behind it. This 
makes it a proper request to your webserver, issued from the command-
line (or crontab in this case).

--Frank