Skip to Content
Using csh & tcsh
book

Using csh & tcsh

by Paul DuBois
July 1995
Beginner to intermediate
244 pages
5h 58m
English
O'Reilly Media, Inc.
Content preview from Using csh & tcsh

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.

Sample output from jobs command

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

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Linux Shells by Example

Linux Shells by Example

Ellie Quigley

Publisher Resources

ISBN: 9781449377526Errata Page