Artificial intelligent assistant

Appending a string to a file from remote ssh 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?

Simply use,


ssh node1 'echo "\$spool_as_final_name true" >> /var/spool/torque/mom_priv/config'


Or you can use the `cat` command,


echo "\$spool_as_final_name true" | ssh node1 "cat >> /var/spool/torque/mom_priv/config"

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 284a5af3a23dc350430725cf3dd12093