Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to make shell script run in low priority

Answer:

At the top of your shell script, add the following line (renice 19 -p $$)


#!/bin/sh

renice 19 -p $$

...
  1. How to get the PID in current bash shell script
  2. Make a file executable in Linux
  3. How to alter the priority of running processes
  4. How to prevent PHP script from running in Apache
  5. Check if a file exist in Bash Shell

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>