home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 12.2 Other Ways to Refer to Jobs Chapter 12
Job Control
Next: 12.4 Job Control and autowrite: Real Time Savers!
 

12.3 The "Current Job" Isn't Always What You Expect

% is the "current" stopped or background job, but not always the last one. If you've stopped any jobs, the current job is the most recently stopped job. Otherwise, it's the most recent background job. For example, try stopping your editor (like vi ), then putting another job in the background:



sleep
 

% vi afile


[CTRL-z]

Stopped
% sleep 1000 &


[2] 12345
% fg

and notice that the fg brings your editor to the foreground.

- JP


Previous: 12.2 Other Ways to Refer to Jobs UNIX Power Tools Next: 12.4 Job Control and autowrite: Real Time Savers!
12.2 Other Ways to Refer to Jobs Book Index 12.4 Job Control and autowrite: Real Time Savers!

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System










??????????????@Mail.ru