On 4/15/06, Kyrre Ness Sjobak <[EMAIL PROTECTED]> wrote: > fre, 14.04.2006 kl. 22.58 skrev Petter Gundersen: > > > > > > cat /dev/video0 > $1 & > > > catpid=$(ps -C "cat /dev/video0" -o pid=) > > > > This will actually return the pids of all running cat processes. ps -C > > only accepts a list of executable names, not their arguments. I > > recommend using catpid=$! instead. > > > > Yes i agree this is cleaner. But there are only one "cat /dev/video0", > unless you have multiple /dev/video0 ;)
But /dev/video0 is interpreted by ps as an executable name, not an argument to cat. Try the following example: $ cat /dev/random > /dev/null & $ cat /dev/video0 > /dev/null & $ ps -C "cat /dev/video0" -o pid,args PID COMMAND 28313 cat /dev/random 28314 cat /dev/video0 Regards, Petter _______________________________________________ ivtv-users mailing list [email protected] http://ivtvdriver.org/mailman/listinfo/ivtv-users
