From owner-freebsd-mobile Thu Mar 23 15:38:31 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from moek.pir.net (moek.pir.net [209.192.237.190]) by hub.freebsd.org (Postfix) with ESMTP id AAFD437C58E for ; Thu, 23 Mar 2000 15:38:28 -0800 (PST) (envelope-from pir@pir.net) Received: from pir by moek.pir.net with local (Exim) id 12YHBL-0005I0-00 for freebsd-mobile@FreeBSD.ORG; Thu, 23 Mar 2000 18:38:27 -0500 Date: Thu, 23 Mar 2000 18:38:26 -0500 From: Peter Radcliffe To: FreeBSD Laptoppers Subject: Re: usb on vaio 505tx Message-ID: <20000323183826.A19683@pir.net> Mail-Followup-To: FreeBSD Laptoppers References: <200003231857.LAA42461@harmony.village.org> <20000323133517.B22554@orion.ac.hmc.edu> <20000323141323.B1409@orion.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: ; from randy@psg.com on Fri, Mar 24, 2000 at 07:16:59AM +0900 X-fish: < Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Randy Bush 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