How to empty fields in mongodb except last ones

Hi @youssef_boudaya

Bash is expanding the $commads as bash variables. To avoid that put the delimiter of your heredoc in quotes.

mongo jenkinsdb<< "EOF" alternatively you can escape each $: \$

2 Likes