I want to ssh to a node (which is passwordless) and append $spool_as_final_name true
to a file /var/spool/torque/mom_priv/config
. Note that is mandatory to put $
in front of the string.
So, I wrote
ssh node01 "echo \"\$spool_as_final_name true\" >> /var/spool/torque/mom_priv/config"
However the file looks like
Dummy
true
I intentionally wrote Dummy to show you that true
is written in the second column.
How can I fix that?
Best Answer
Simply use,
Or you can use the
cat
command,