How to implement fork and exec in bash?
Assume the script as
echo "Script starts" function_to_fork(){ sleep 5 echo "Hello" } echo "Script ends"
Basically, I want this function to be called as a new process, such as in C, we use calls to fork and exec ..
From the script, the parent script is expected to end, and then "Hello" will be printed after 5 seconds.
linux scripting bash shell
Abhijeet Rastogi Jun 22 '10 at 19:46 2010-06-22 19:46
source share