I'm trying to break down the following plink command and modify it to allow a variable substitution.
plink.exe 192.168.1.1 --% echo """#define MYSPACE""" > /home/my/file.txt
I want to do the following, but But what follows the echo
is sent to bash verbatim.
plink.exe 192.168.1.1 --% echo """#define MYSPACE""" > /$(home)/my/file.txt
Constructing the echo
string before the plink
command doesn't work for the same reason; everything after echo
is sent verbatim. How can this be done?