Java Mailing List Archive

http://www.redhatconfig.com/

Home » Red Hat Linux Discussion »

Re: Query on "nice" command

Cameron Simpson

2008-02-25

Replies:

Author LoginPost Reply
On 25Feb2008 11:57, Ravi Shanmugam <ravi.shanmugam@(protected):
| I am writing a shell script, but I run that shell script with "nice -18"
| priority without invoking from command line like "nice -18 <script
| name>.
| Is it possible to embed the "nice" command in the same shell script? If
| yes, could somebody help me.

If you are thinking "make the script make itself nice", then yes. You want
the "renice" command, for adjusting the niceness of an existing process.
Apply it to the current process using $$ (the shell's script's process id):

renice 18 -p $$

See "man renice" for details.

Cheers,
--
Cameron Simpson <cs@(protected)
http://www.cskk.ezoshosting.com/cs/

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)
https://www.redhat.com/mailman/listinfo/redhat-list
©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.