in reply to Remotely Executing a background command

Returning a value and running in the background seems contradictory to me. If you send a job to the background you're explicitly not waiting for a result.

For running something in the background on the remote host after your ssh connection has terminated, take a look at nohup and screen.

Replies are listed 'Best First'.
Re^2: Remotely Executing a background command
by Bloodnok (Vicar) on Jul 31, 2008 at 15:23 UTC
    ...and if you want the status code of a background command, use wait(1).

    HTH more :-)

    At last, a user level that overstates my experience :-))