For your shell script to be directly runnable you have to:
-
Start it with
#!/bin/sh(or#!/bin/bash, etc). -
You have to make it executable, aka
chmod +x script.
If you don’t want to do that, then you will have to execute /bin/sh with the path to the script.
cmd := exec.Command("/bin/sh", mongoToCsvSH)