Obtaining Job Information
The jobs command reports any jobs that you have running in the background and any jobs that are stopped. Figure 15-1 shows a job list that might result during a session of analyzing a set of data files.

Figure 15-1. Sample output from jobs command
If a job consists of a multiple-command pipeline, commands in the pipeline that have finished are displayed on a different line than those that are still running. The third job in Figure 15-1 demonstrates this type of display: grep and cut have finished executing, but anova is still running.
jobs –l displays jobs in long format. The long format reports the process ID along with the usual information.
In tcsh, you can cause automatic jobs execution whenever you stop a job, if you set the listjobs shell variable in your ˜/.cshrc file as follows:
set listjobs
If you would rather have jobs –l executed instead, set listjobs to long, as shown below:
set listjobs = long
Finding Out When Jobs Finish
By default, when a job finishes (or otherwise changes state), the shell informs you that the job has completed only when it must print another prompt.[29] If you want to be notified immediately, set the notify shell variable in your ˜/.cshrc file as shown below:
set notify
set notify provides you with quicker notification. However, if a notification message occurs in the middle of the output from another command, you might miss it in the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access