How do I implement fork and exec in bash?
Let us suppose script as
echo \"Script starts\" function_to_fork(){ sleep 5 echo \"Hello\" } echo \"Script en
Use the ampersand just like you would from the shell.
#!/usr/bin/bash function_to_fork() { ... } function_to_fork & # ... execution continues in parent process ...
How about:
(sleep 5; echo "Hello World") &