From: Liam Bedford (lbedford at domain netnoteinc.com)
Date: Tue 16 Jul 2002 - 13:22:24 IST
On Tue, 16 Jul 2002 13:16:20 +0100
Donncha O Caoimh claiming to think:
> I renice my setiathome processes when I'm AFK . I setup the renice command as
> follows:
> ps auxw|grep setiathome| awk '{ if ($11 == "setiathome") print $2 }' | xargs
> echo renice 20
>
> That makes sure the grep doesn't get caught in the pipe to xargs.
>
> Now, if someone could show me how to stuff the renice command into the command
> line history/buffer from a shell script I wouldn't have to copy/paste it
> afterwards.
>
make it a bash function, and stick it in ~/.bashrc?
rns ()
{
ps auxw|grep setiathome| awk '{ if ($11 == "setiathome") print $2 }' | xargs -iV echo renice 20 V
}
?
then just type rns later.
L.
--
dBP dBBBBb | If you're looking at me to be an accountant
dBP | Then you will look but you will never see
dBP dBBBK' | If you're looking at me to start having babies
dBP dB' db | Then you can wish because I'm not here to fool around
dBBBBP dBBBBP' | Belle & Sebastian (Family Tree)
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:17:55 GMT