I’m trying to redirect content of a variable to a file through ssh. like:
ssh $MachineIP echo $CM_Config > $mName/CM_CONFIG
where $CM_Config is a local variable in my host containing multiple line, and $mName/CM_CONFIG is located in $MachineIP
how should I redirect local variable to the remote file assuming my ssh configurations are correct.
Thanks in advance
In my case the problem solved with this command:
In fact without \” enclosing my variable, my problem didn’t solved. Maybe it is because that the content of these variables are somehow like bash command and are in multiple lines.