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 $: \$
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 $: \$