The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 05-27-2009
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,415
Quote:
Originally Posted by tindasz View Post
get the background process pid using $!

How to get it ?
are u have a sampe of script?
this is what you have to do

Code:
 
 snoop &
PID=`echo $!`
sleep 600
kill -9 $PID