How can I spawn a process after a delay in a shell script? I want a command to start 60 seconds after the script starts, but I want to keep running the rest of the script without waiting 60 seconds first. Here's the idea:
#!/bin/sh
# Echo A 60 seconds later, but without blocking the rest of the script
sleep 60 && echo "A"
echo "B"
echo "C"
The output should be
B
C
... 60 seconds later
A
I need to be able to do this all in one script. Ie. no creating a second script that is called from the first shell script.