[PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy
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

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy
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

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread 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

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy
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

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy
: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

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy
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

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread 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

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy
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

[PHP] PHP command line scripting multiple process forking

2002-03-21 Thread Walker, Roy
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 =