I'm writing a script that opens ssh, connects to django, gets data from the app using python commands from the python script myscript.py. However the current code doesn't work.
#!/bin/bash xterm -hold -e ssh server python /srv/django/manage.py shell execfile ./myscript
With this, I get a command error:
Command doesn't accept any arguments
I also tried:
#!/bin/bash xterm -e ssh server python /srv/django/manage.py shell execfile('./myscript.py')
but got a syntax error:
line 3: syntax error near unexpected token '('