The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bring a cron job to foreground vibhor_agarwali UNIX for Advanced & Expert Users 5 05-07-2008 02:35 AM
Execute SAS Foreground terala Shell Programming and Scripting 0 10-21-2005 12:50 PM
set background/foreground color in .profile dvella UNIX for Dummies Questions & Answers 3 08-14-2005 04:12 PM
Background job rdbooth UNIX for Dummies Questions & Answers 1 03-23-2004 04:59 AM
problems with ctrl-z, to switch foreground, background yls177 UNIX for Dummies Questions & Answers 9 04-15-2003 09:09 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-01-2006
Registered User
 

Join Date: Feb 2006
Posts: 2
how to get background job to foreground

hi, i am just wondering that wen we give the following code we make a process run in background...can the viceversa be performed?i.e can this be made foreground again

[root@sandy root]# sleep 75&
[1] 21751
[root@sandy root]#
Reply With Quote
Forum Sponsor
  #2  
Old 02-01-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
Depends on the shell. Try:
fg
Reply With Quote
  #3  
Old 02-01-2006
Registered User
 

Join Date: Feb 2006
Posts: 2
hi there, i am using bash ,so shud i jump to jsh to make it foreground or will it work for bash itself
Reply With Quote
  #4  
Old 02-02-2006
Registered User
 

Join Date: Dec 2005
Location: MD
Posts: 18
A "trick" that I like to use is..

[root@dev]# sleep 50
(then hit Ctrl-Z)
[1]+ Stopped sleep 50
[root@dev]# bg
[1]+ sleep 50 &
[root@dev]# fg
sleep 50
Reply With Quote
  #5  
Old 02-02-2006
Registered User
 

Join Date: Dec 2005
Location: London
Posts: 222
from man bash... fg is available in bash also, pls refer to the manual page of bash for more details.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:56 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0