I am trying to do a match for an expression and it to a variable from the
output of a command:
?php
$lines = file ($file);
while (list ($line_num, $line) = each ($lines)) {
$trimline = trim ($line);
$output = shell_exec ($prog $cmdline $trimline );
}
?
How can look through $output to
There will be a specific number of variables returned. I just wanted to set
all the output to a string and just run through it to grab the variables.
Thanx
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy
. Any
ideas?
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions? Help!
well, ya might try:
$my_array = explode( \ ,$output);
this would set:
$my_vars[0] = variable1
Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions? Help!
exec()
-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25
:50 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions? Help!
exec() works for me.
Remember, though, it returns only the LAST line. Have you tried the
following to ensure it's constructing the command you think it is:
$mycmd = $prog $cmdline $trimline
Sorry. Yes. It looks exactly like it should. And I see the ouput from the
command like it should on the screen, I just can't capture it in the script.
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:59 PM
To: 'Walker, Roy
No. I think there is a carriage return (\n), but there is not a blank line
at the end.
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 3:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions
PM
To: 'Darren Gamble'; 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions? Help!
exec() can capture ALL output from a command if you supply an array as the
second argument to it
-Original Message-
From: Darren Gamble [mailto:[EMAIL PROTECTED]]
Sent
I have been playing with this for a couple of days and have run into a few
issues:
I am wanting to run a set number of multiple processes (ie 25 at a time). I
can't use the exec command since it will not wait for the output (this is a
delayed response - network based).
$cmd =
9 matches
Mail list logo