Romulogomes,

Yup you can use it to run a shell script or any other program you wish.

Here you can run a shell script called myscript
<CFSET arguments="#PARAM1#">
<CFEXECUTE
        NAME="/usr/local/bin/myscript"
        ARGUMENTS=#arguments#
        OUTPUTFILE="/var/www/html/mysite/mysite.foo"
        TIMEOUT="999">
</CFEXECUTE>

Here you can use it to call GREP
<CFSET arguments="#STRING# #DIRECTORY#">
<CFEXECUTE
        NAME="/bin/grep"
        ARGUMENTS=#arguments#
        OUTPUTFILE="/tmp/grepoutput"
        TIMEOUT="10">
</CFEXECUTE>

If the request doesn't have the correct privileges to run that program it
simply returns an error page.

[EMAIL PROTECTED] is a good source of info.  There is a guy there
Jesse Nolle who knows his onions.

Stephen
-----Original Message-----
From: James Maltby [mailto:[EMAIL PROTECTED]]
Sent: 27 March 2002 13:07
To: CF-Talk
Subject: RE: Run SHELL


As far as I am aware cfexecute only runs on NT and UNIX platforms - whether
that means Linux I dunno - worth a try I guess - you can use the optional
ARGUMENTS syntax to pass command-line arguments to a program, elements of
the ARGUMENTS array is copied into a corresponding array of exec() arguments
on UNIX.

Dunno if this helps...

J

-----Original Message-----
From: romulogomes [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 27, 2002 10:03
To: CF-Talk
Subject: Run SHELL


Can I use cfexecute to run a linux shell file?



______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to