Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Oct 2001 10:34:08 -0500
From:      Mike Meyer <mwm@mired.org>
To:        "jason" <jasonc@concentric.net>
Cc:        questions@freebsd.org
Subject:   Re: creating conf files through scripting
Message-ID:  <15296.30192.124715.492534@guru.mired.org>
In-Reply-To: <14738214@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
jason <jasonc@concentric.net> types:
> I need some help with creating files based on data stored in mysql.  I know
> how to do this with PHP but don't know if I can call on a PHP script via
> CRON.  I also don't know how to use SH to read from mysql and write to
> files.
> Can Anyone point me in the write direction?

I like XEmacs for code and Applix Word for documents :-).

> Or point me to a comprehensive reference guide for using SH?

That's hard to do, because the shell is a tool for tying together all
the tools that you have available. That varies far to much to keep
track of.

My two favorite books on this topic are "Unix Power Tools" by Jerry
Peek et. al., and "The Unix Programming Environment" by Kernighan and
Pike.

> Or maybe tell me if and how I can call on PHP scripts to do what I want?  So
> far everything I read on PHP is web server based.

Well, you might consider a script that does the web interactions. For
instance, if you have to fill out a single form and submit it, and the
program that handles it will work with a GET, you can construct a URL
and use fetch in the base system to do it. If you need to do a POST or
do authentication, then consider using Python and the urllib module,
which will handle all those things. Since it doesn't depend on a lot
of external tools, the comprehensive reference guides are the language
and library references.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Q: How do you make the gods laugh?		A: Tell them your plans.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15296.30192.124715.492534>