Run a UNIX command on a stream from a Bash script
Background problem
I have a post-commit script for my SVN repository that archives and backs up incremental dump files when checking out.
I would like to update this to make an off-site backup, however the off-site copy can take a few minutes if the check is very large.
Question
Is it possible in a UNIX bash script to execute this copy on a thread that returns immediately by doing the action in the background?
Cheers for any help!
a source to share
nohup my-background-task &
Finishing &
tells bash to run it as a background job. The command nohup
will take care of running the task completely in the background: it tells it to ignore the bounce signals (from the parent process being closed), and if necessary, it closes or redirects standard input and standard output (so your background task wins. "No, hold on trying to open SSH window, for example).
a source to share