I'm using pscp.exe to transfer files from Windows to Linux. This command works fine:
pscp myfile.txt user@host:/airflow/dags
The location on the Linux host into which I want to transfer the files is stored in a environment variable:
$ echo $AIRFLOW_HOME
/airflow
I'd like to refer to that environment variable in the call to pscp. Unfortunately it doesn't work:
pscp myfile.txt user@host:$AIRFLOW_HOME/dags
returns pscp: unable to open /dags: permission denied (which makes sense of course, /dags does not exist).
Clearly the $AIRFLOW_DAGS part of the command is not getting resolved on the host. So, is there a way to refer to environment variables on the host in my pscp command?