Date: Thu, 23 Mar 2000 18:38:26 -0500 From: Peter Radcliffe <pir@pir.net> To: FreeBSD Laptoppers <freebsd-mobile@FreeBSD.ORG> Subject: Re: usb on vaio 505tx Message-ID: <20000323183826.A19683@pir.net> In-Reply-To: <E12YFuV-0000FJ-00@roam.psg.com>; from randy@psg.com on Fri, Mar 24, 2000 at 07:16:59AM %2B0900 References: <E12Y7z9-0000JQ-00@roam.psg.com> <200003231857.LAA42461@harmony.village.org> <E12YEzd-00008i-00@roam.psg.com> <20000323133517.B22554@orion.ac.hmc.edu> <E12YFZp-0000D7-00@roam.psg.com> <20000323141323.B1409@orion.ac.hmc.edu> <E12YFuV-0000FJ-00@roam.psg.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Randy Bush <randy@psg.com> probably said: > /bin/ps -auxw | grep "moused" | grep -v grep | awk '{print $2}' | xargs kill > /usr/sbin/moused -t auto -p /dev/$m Pet peeve # 326; people who pipe grep output into grep and especially if it then goes into awk. This is somewhat more friendly (and rather more accurate as a nice byproduct); /bin/ps -auxw \ | awk '$1 == "root" && $11 ~ "^(/usr/sbin/)?moused$" {print $2}' | xargs kill or /bin/ps -auxw \ | awk '$1 == "root" && $11 ~ "^(/usr/sbin/)?moused$" {system("kill " $2)}' depending on how many processes are likely to be killed. The former is more efficient for 3 or more. There isn't much difference. I'm making the assumption here that moused runs as root (I don't use it currently). P. -- pir pir@pir.net pir@net.tufts.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000323183826.A19683>