You are not logged in.
"sudo echo foo > bar" leverages echo, not the redirect.
A common solution is to abuse tee "echo foo | sudo tee bar" but you could also just sudo the script (and add it to sudoers w/ NOPASSWD)
Online
Thank you very much. With a little script and a shortcut on the deskto the problem is solved !
Offline