what about
nice bash -e '<script>'
On Sun, Mar 09, 2008 at 05:34:48PM +0800, Wei Chen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I usually use ``nice'' and ``ionice'' to run a program in a low
> priority. But with the following script, I only get command1 running in
> a low priority. How can I make both command1 and command2 on the pipe
> running in the low priority? Thank you.
>
> =================================
> #!/bin/sh
> runprogram () {
> nice -n19 ionice -c2 -n7 "$@"
> }
> runprogram command1 | command2
> =================================
>
> - --
> Cheers,
>
> Wei Chen
> http://www.acplex.com/people/wchen/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFH0684CIqXQV6BF28RAvhkAKDFHHCqrBivZ76qx7rYDnXjRrF4OgCeKVcm
> ra/9VH1h5yS0vQtU5MnrEQI=
> =Gqpw
> -----END PGP SIGNATURE-----
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
--
"I own a timber company? That's news to me. Need some wood?"
- George W. Bush
10/08/2004
St. Louis, MO
Second presidential debate
Attachment:
signature.asc
Description: Digital signature