How to make a Shell Script create a copy and terminate itself?
- by ricedragon
So far I used
trap " call function" 2
fucntion
{
./test.sh
exit
}
but it never reaches the exit line and a whole bunch of process piles up any one got any idea?
I tried & (bg) but i need to be able to keep doing it , the bg only allows me to do it once
The point of it is when i type ctrl C it should terminate the original test.sh but it should also call itself before terminating hence create a new process.