Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I want to run two programs

ssh -f mike@c15-0330-02 'cd /home && nohup Rscript L_1.R> L_1_sh.txt '

AND

ssh -f mike@c15-0330-03 'cd /home && nohup Rscript L_2.R> L_2_sh.txt '

I write a shell script as

ssh -f mike@c15-0330-02 'cd /home && nohup Rscript L_1.R> L_1_sh.txt ' &
ssh -f mike@c15-0330-03 'cd /home && nohup Rscript L_2.R> L_2_sh.txt ' &

But it always shows

: command not found:
: command not found:
: command not found:
share|improve this question
    
Did the commands work on there own? i.e. ssh -f mike@c15-0330-02 'cd /home && nohup Rscript L_1.R> L_1_sh.txt ' –  richard Apr 15 at 9:55

1 Answer 1

up vote 0 down vote accepted

Make sure your paths on the remote are correct. Most scripts don't live under /home

share|improve this answer
    
Did the questioner forget the ./ before the Rscript or was it something else. –  richard Apr 15 at 9:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.