On 9/26/13 10:52 AM, Greg Wooledge wrote:
> On Thu, Sep 26, 2013 at 06:27:10AM +0000, Hinrik Örn Sigurðsson wrote:
>> The "&&" operator in bash seems to inhibit backgrounding when run over
>> ssh. You can try it with the following:
>>
>> ssh localhost "cd /tmp && nohup sleep 10 >/dev/null 2>&1 &"
>>
>> The above command will wait for sleep(1) to finish before returning.
>
> Confirmed on HP-UX 10.20 with bash 4.2.37. Changing && to ; causes
> an immediate return.
Those two are not equivalent; `&&' and `;' have different precedence.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/