I'm trying to run a bash script on a remote machine, and I'd like to return immediately after running the script in the background of the remote machine. For instance:
$ echo foo.txt
sleep 2000 &
then when I tried to do:
$ ssh x.x.x.x 'bash -s' < foo.txt
the command never returns. Is there a way to make it return while sleep
runs in the background on the remote machine?