Shell_command newbie help

hi,
I am at my first shell_command attempt and I am a bit lost as my thingy does not work, nor it throws any error.

in configuration.yaml i have:

shell_command:
  write_to_msg: "echo {{msg}} >>/config/message.txt"

then I try running it via a script or via services under developer,

service: shell_command.write_to_msg
data:
  msg: "abc"

The issue is that my file /config/message.txt does not get appended whith ‘abc’ nor does HA throw any error.

I am on haas OS

Any sugeestion what I am doing wrong/ where to look next?

Thanks

I figured it out after 2 hours of forum reading and trial and error…
To make it work this is the change I came to:

shell_command:
  write_to_msg: /bin/bash -c "echo '{{ msg }}' >> /config/message.txt"

I think is the ’ ’ which were missing to surround the {{msg}}. I guess the bash interpreter did not know what to do with {{msg}}