Need help understanding a bash command

Posted by user198729 on Stack Overflow See other posts from Stack Overflow or by user198729
Published on 2010-03-12T12:15:47Z Indexed on 2010/03/12 12:17 UTC
Read the original article Hit count: 138

Filed under:
|

It's actually a combination of php and bash:

exec(sprintf("%s > %s 2>&1 & echo $! >> %s", $cmd, $outputfile, $pidfile));

I don't understand what 2>&1 & echo $! is there for?

© Stack Overflow or respective owner

Related posts about bash

Related posts about php