exec.Command doesn't do any splitting of strings into individual
command-line arguments. You would need to call strings.Split()
yourself. However, the pipe is going to be a problem as exec.Command
doesn't spawn a shell. You might have better luck with:
exec.Command("bash", "-c", `git ls-tree -r --name-only HEAD | while
read filename; do echo "$(git log
-1 --format="%at" -- $filename) $filename"; done`)
(Didn't test that, uses raw strings instead of escaped quotes)
> --
>
>
--
matt kane's brain
http://hydrogenproject.com