--- /dev/null
+
+# Introduction #
+
+This is a very simple bash script to run scripts on a remote machine
+accessible by ssh, send required files, and get back result files
+transparently.
+
+It creates a temporary files in /tmp/ on the remote host and run
+everything in it.
+
+I use it mostly to launch heavy training with pytorch on a PC at home.
+
+# Example #
+
+With
+
+```
+xremote.sh ./example.py
+```
+
+where [`example.py`](https://fleuret.org/git-extract/xremote/example.py) is the file given with `xremote.sh`:
+
+
+```
+#!/usr/bin/env python
+
+# @XREMOTE_HOST: elk
+# @XREMOTE_EXEC: python3
+# @XREMOTE_GET: *.txt
+# @XREMOTE_SEND: *.py
+# @XREMOTE_PRE: ls -lt > files.txt
+
+print('I am being executed!')
+
+file = open('result.txt', 'w')
+file.write('This is a text.\n')
+file.close()
+```
+
+`xremote.sh` will:
+
+ 1. create a temporary directory on the remote host 'elk'
+ 2. copy there the file example.py,
+ 3. copy there files from the local dir with the .py extension,
+ 4. list all files on the remote side into the file files.txt,
+ 5. execute example.p on the remote side,
+ 6. get back all the files with the .txt extension,
+ 7. delete the working directory on the remote side.
--- /dev/null
+#!/usr/bin/env python
+
+# @XREMOTE_HOST: elk
+# @XREMOTE_EXEC: python3
+# @XREMOTE_GET: *.txt
+# @XREMOTE_SEND: *.py
+# @XREMOTE_PRE: ls -lt > files.txt
+
+print('I am being executed!')
+
+file = open('result.txt', 'w')
+file.write('This is a text.\n')
+file.close()