cmd
cmd copied to clipboard
special character '>'
Hello I have a command to build gradle like: ./gradlew build final dependencies > dep.txt
but when executed through cmd.NewCmdOptions it gives an error when building in the Gradle: Task '>' not found in root project 'xxxx'.
tell me how to solve the problem?there may be some kind of special character escaping >
>
is output redirection, not part of the command. So use Options to set streaming or buffered output (and to combine STDOUT or STDERR or not). If you choose streaming output, you'd read Cmd.Stdout (and/or .Stderr) channels and write them to a file. If you choose buffered output, you'd copy Status.Stdout (and/or .Stderr) to file.