Re: Query on "nice" command

On 25Feb2008 11:57, Ravi Shanmugam <ravi.shanmugam@xxxxxxxxxx> wrote:
| 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.

Cameron Simpson <cs@xxxxxxxxxx> DoD#743

redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe

Relevant Pages