Managing background commands in shell scripts

Monday, 13 September 2004, 12:06 AM EST

Unix shells provide a method of running more that one command, or shell script, at a time by placing the command into the background with an ď&Ē. A command placed into the background will continue to run and get CPU cycles while allowing you to run new commands without having to open a new terminal. This is especially useful when executing long-running commands, when running tasks that can benefit from running in parallel, when physically connected to the system terminal, or when opening a new terminal just isnít convenient.

Once a command has been placed into the background, shells provide a method for controlling and monitoring the background commands using something known as job control. Itís the use of job control, specifically from within a Korn shell script, which is the topic of this article.

By Rainer Raab at UNIX Review.

[ Read more ]




Spotlight

Lessons learned developing Lynis, an open source security auditing tool

Posted on 15 October 2014.  |  Lynis unearths vulnerabilities, configuration errors, and provides tips for system hardening. It is written in shell script, installation is not required and can be performed with a privileged or non-privileged account.


Weekly newsletter

Reading our newsletter every Monday will keep you up-to-date with security news.
  



Daily digest

Receive a daily digest of the latest security news.
  

DON'T
MISS

Mon, Oct 20th
    COPYRIGHT 1998-2014 BY HELP NET SECURITY.   // READ OUR PRIVACY POLICY // ABOUT US // ADVERTISE //