This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

exec output processing

Old posts that have not been replied to for several years.
Locked
t
tebor
Voice
Posts: 8
Joined: Sun Sep 12, 2004 1:27 am

exec output processing

Post by tebor »

Hi Community

I am working on a script letting eggdrop do certain functions on a mysql database by evoking the unix shell command mysql. Executing works perfect but I am wondering how I can reuse the output delivered. For example I am doing a search on the DB and get a list. Hence it is multiple lines I can just put it into a variable.
At the moment I would be happy if I can reroute the output to a PRIVMSG.
Is it possible to populate an array holding the various lines of the comamnd output?


Tebor
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you can pipe the shell command output to your script, but the proper way to interface mysql database from tcl would be to use an appropriate externsion/package, for example mysqltcl (or mysql.mod eggdrop module)
Locked