How to make a Shell Script create a copy and terminate itself?
Posted
by
ricedragon
on Super User
See other posts from Super User
or by ricedragon
Published on 2011-11-14T09:36:14Z
Indexed on
2011/11/15
1:58 UTC
Read the original article
Hit count: 177
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.
© Super User or respective owner