Declarative Jenkins

Hey people, who is working with Jenkins.
Could somebody knows how to run such string in declarative Jenkins pipeline properly?
find /mnt/docker_data -name *-json.log -size +${max_log_size} -exec truncate -s 100 {} \;

When I’m executing the following command in a loop

            sh("""ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${ip} bash -s<<-'EOF'
              echo "Truncate the logs on ${ip}"
              find /mnt/docker_data -name *-json.log -size +${max_log_size} -exec truncate -s 100 {} \;
EOF""")
          }```
I’m getting the error:
```WorkflowScript: 46: unexpected char: '\' @ line 46, column 102.
   ize} -exec truncate -s 100 {} \;
                                 ^```

Have you tried escaping it like \\

Yep. I did it. thanks