Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] How to catch the standard output ?



******    message to minivend-users from Murray Gibbins <Murray@scotweb.ltd.uk>     ******

Philippe TOUSSAINT wrote:
> 
> ******    message to minivend-users from "Philippe TOUSSAINT" <ptoussaint@iptechs.net>     ******
> 
> I would like to catch the standard output after running an external program  and insert it in a page on the fly.
> Many thanks
> 
> Phil
> 

ok try this..

[perl global=1]

open (PROG,"/sbin/someprog |") || die "A hidoues mess, probably been hacked
:-P\n";
my @lines = <PROG>;
close PROG;

my $string = join("",@lines);

return $string;
[/perl]

or some variation on the theme. Becarefull that you don't compromise system
security.

-- 
  ____
  \__/    Murray Gibbins             murray@scotweb.ltd.uk
  /  \    Programmer
_ \__/ _  ================================================
\\ || //  Scotweb Limited,             info@scotweb.ltd.uk
 \\||//   13a Albert Terrace,    http://www.scotweb.ltd.uk
  \||/    Edinburgh EH10 5EA   Tel: +44 (0)  131 270 82 33
   ||     Scotland. Europe.    Fax: +44 (0) 7020  93 49 04
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: