To download from the CURIE cluster in France, the do_sftp script mentioned above will look like this
#! /bin/bash sshpass -p 'password' sftp email@example.com << ! cd /ccc/work/cont005/ra1260/patargig/act_MG_DUMMY get prod1_out* bye !
This script downloads all files that contain "prod1_out" in their name.The program sshpass is used for establishing an ssh/sftp connection non interactively. If it is not installed in your machine, you issue
sudo apt-get install sshpass
In this way, we can transfer files after working hours but the fact that the password is contained in plain text in the script, poses a security risk.