On 06 August 2003 15:19, Jason Wong wrote: > On Wednesday 06 August 2003 21:29, Nicolas Frisby wrote: > > > Regardless of that, do you know anything of how the piping mechanism > > works? > > Not really. I do know that what you're trying to do doesn't work for > bash scripts either. IE you cannot use a pipe to pass command line > arguments to a bash script, nor a php script.
Well, no -- command line arguments are not STDIN, as a general rule. That's why they're passed separately in argc, argv. When you pipe one process into another: x | y the standard output (STDOUT) of x is "piped" directly into the standard input (STDIN) of y -- so whatever x sends to STDOUT, y will see on STDIN. The mechanics of this aren't really important (although commonly x's STDOUT is written to a tempfile, which y's STDIN is then read from), so long as you understand the principles of it. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php