FAQ
Hello,
Have couple of questions. First of all, I try to redirect standard
output after executing google closure stylehseets jar file, but even though
I see output in the console, I don't see anything in stdout pipe (in go
code). Here is little code snippet - http://pastie.org/5051763. The strange
part is that when I use another preprocessor (sassc), then output from
stdout is shown correctly. I assume it has something to do with java, but
not quite sure what exactly.
Other question I have is - where should I put PATHs in order for them
to be fetched when I execute "exec.Command". I tried adding values to
.bashrc, but it doesn't seem to work.

--

Search Discussions

  • José Carlos Nieto at Oct 13, 2012 at 11:30 am
    PATH is fine in .bashrc, the syntax could be incorrect. You can always use
    PATH=$PATH:/new/path ./executable too.

    Did you thy using os.Stdout and os.Stderr and io.Copy? same results?

    go io.Copy(os.Stdout, outPipe)
    go io.Copy(os.Stderr, errPipe)
    On Saturday, October 13, 2012 5:54:58 AM UTC-5, Andrew Romanov wrote:

    Hello,
    Have couple of questions. First of all, I try to redirect standard
    output after executing google closure stylehseets jar file, but even though
    I see output in the console, I don't see anything in stdout pipe (in go
    code). Here is little code snippet - http://pastie.org/5051763. The
    strange part is that when I use another preprocessor (sassc), then output
    from stdout is shown correctly. I assume it has something to do with java,
    but not quite sure what exactly.
    Other question I have is - where should I put PATHs in order for them
    to be fetched when I execute "exec.Command". I tried adding values to
    .bashrc, but it doesn't seem to work.
    --
  • Andrew Romanov at Oct 13, 2012 at 6:58 pm
    Thanks, io.Copy worked - http://pastie.org/5053670. But regarding the PATH,
    .bashrc worked for bash. But it didn't work for "exec.Command" (those paths
    were not fetched)

    суббота, 13 октября 2012 г., 14:30:21 UTC+3 пользователь José Carlos Nieto
    написал:
    PATH is fine in .bashrc, the syntax could be incorrect. You can always use
    PATH=$PATH:/new/path ./executable too.

    Did you thy using os.Stdout and os.Stderr and io.Copy? same results?

    go io.Copy(os.Stdout, outPipe)
    go io.Copy(os.Stderr, errPipe)
    On Saturday, October 13, 2012 5:54:58 AM UTC-5, Andrew Romanov wrote:

    Hello,
    Have couple of questions. First of all, I try to redirect standard
    output after executing google closure stylehseets jar file, but even though
    I see output in the console, I don't see anything in stdout pipe (in go
    code). Here is little code snippet - http://pastie.org/5051763. The
    strange part is that when I use another preprocessor (sassc), then output
    from stdout is shown correctly. I assume it has something to do with java,
    but not quite sure what exactly.
    Other question I have is - where should I put PATHs in order for them
    to be fetched when I execute "exec.Command". I tried adding values to
    .bashrc, but it doesn't seem to work.
    --
  • Dave Cheney at Oct 13, 2012 at 11:41 pm
    Maybe you want Cmd.Output()

    http://go.pkgdoc.org/os/exec#Cmd.Output
    On Sun, Oct 14, 2012 at 5:58 AM, Andrew Romanov wrote:
    Thanks, io.Copy worked - http://pastie.org/5053670. But regarding the PATH,
    .bashrc worked for bash. But it didn't work for "exec.Command" (those paths
    were not fetched)

    суббота, 13 октября 2012 г., 14:30:21 UTC+3 пользователь José Carlos Nieto
    написал:
    PATH is fine in .bashrc, the syntax could be incorrect. You can always use
    PATH=$PATH:/new/path ./executable too.

    Did you thy using os.Stdout and os.Stderr and io.Copy? same results?

    go io.Copy(os.Stdout, outPipe)
    go io.Copy(os.Stderr, errPipe)
    On Saturday, October 13, 2012 5:54:58 AM UTC-5, Andrew Romanov wrote:

    Hello,
    Have couple of questions. First of all, I try to redirect standard
    output after executing google closure stylehseets jar file, but even though
    I see output in the console, I don't see anything in stdout pipe (in go
    code). Here is little code snippet - http://pastie.org/5051763. The strange
    part is that when I use another preprocessor (sassc), then output from
    stdout is shown correctly. I assume it has something to do with java, but
    not quite sure what exactly.
    Other question I have is - where should I put PATHs in order for them
    to be fetched when I execute "exec.Command". I tried adding values to
    .bashrc, but it doesn't seem to work.
    --
    --
  • Andrew Romanov at Oct 14, 2012 at 1:32 pm
    Just what I needed. Thanks a lot ;)

    воскресенье, 14 октября 2012 г., 2:41:10 UTC+3 пользователь Dave Cheney
    написал:
    Maybe you want Cmd.Output()

    http://go.pkgdoc.org/os/exec#Cmd.Output
    On Sun, Oct 14, 2012 at 5:58 AM, Andrew Romanov wrote:
    Thanks, io.Copy worked - http://pastie.org/5053670. But regarding the PATH,
    .bashrc worked for bash. But it didn't work for "exec.Command" (those paths
    were not fetched)

    суббота, 13 октября 2012 г., 14:30:21 UTC+3 пользователь José Carlos Nieto
    написал:
    PATH is fine in .bashrc, the syntax could be incorrect. You can always
    use
    PATH=$PATH:/new/path ./executable too.

    Did you thy using os.Stdout and os.Stderr and io.Copy? same results?

    go io.Copy(os.Stdout, outPipe)
    go io.Copy(os.Stderr, errPipe)
    On Saturday, October 13, 2012 5:54:58 AM UTC-5, Andrew Romanov wrote:

    Hello,
    Have couple of questions. First of all, I try to redirect standard
    output after executing google closure stylehseets jar file, but even
    though
    I see output in the console, I don't see anything in stdout pipe (in
    go
    code). Here is little code snippet - http://pastie.org/5051763. The
    strange
    part is that when I use another preprocessor (sassc), then output from
    stdout is shown correctly. I assume it has something to do with java,
    but
    not quite sure what exactly.
    Other question I have is - where should I put PATHs in order for
    them
    to be fetched when I execute "exec.Command". I tried adding values to
    .bashrc, but it doesn't seem to work.
    --
    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 13, '12 at 10:55a
activeOct 14, '12 at 1:32p
posts5
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase