Re: USB script

Albert D. Cahalan (acahalan@cs.uml.edu)
Fri, 30 Apr 1999 13:35:45 -0400 (EDT)


Dominik Kubla writes:
> On Thu, Apr 29, 1999 at 05:52:50PM -0400, Albert D. Cahalan wrote:
>> Dominik Kubla writes:

>>> UPID=`ps -C uhci-control -o pid --no-headers`
>>
>> That is almost what I initially thought:
>> UPID=`ps -C uhci-control -o pid=`
>> (if all column heads are empty, no header line is printed)
>
> Haven't checked it, but would
>
> UID=`ps -u root -C uhci-control -o pid=`
>
> work? If -u and -C can not yet be specified together, would it make
> sense to allow it in the a futher version of ps ?

That does not work the way you might want it to work.
As required by standards, you get BOTH root-owned processes
and processes named "uhci-control".

I have indeed thought about adding an option to change the logic.

This is fairly good:

UID=`ps --sort=ruid -C uhci-control -o pid= | head -1`

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/