What does "Ambiguous output redirection" mean?

I have a PHP script that I want to call in some form action.

This command works great:

/usr/local/bin/php -q script.php > /dev/null 2>&1 &

But things go wrong when I add arguments to the command:

/usr/local/bin/php -q script.php --var=value > /dev/null 2>&1 &

it returns "Undefined output redirection".

I read this article http://www.xaprb.com/blog/2006/06/06/what-does-devnull-21-mean/ and tried almost everything as far as I can understand, and still don't know how it is fix it.

Please help me.

+5
source share
3 answers

I assume that you are using csh or one of its variants, use:

... >&/dev/null
+4
source

:

/usr/local/bin/php -q script.php --var=value > &1 &

.

?

, - . , AiX, root, , - , " ".

STDERR, STDOUT, , - .

, . : , : http://www.faqs.org/faqs/unix-faq/faq/part2/section-9.html

+1

:

/usr/local/bin/php -q script.php --var=value > /dev/null 2>/dev/null & 
0

All Articles