Re: [go-nuts] Wrapping executable that takes input and output files such that it uses stdin and stdout instead (using named pipes)

2018-02-11 Thread Or Rikon
That's a really nice trick. Thanks for sharing. On Sunday, February 11, 2018 at 3:48:09 AM UTC-5, Michael Houston wrote: > > If you're using Bash or some other unix-y shell which supports it, you can > produce the same effect with built-in syntax: > > https://unix.stackexchange.com/a/64011 > >

Re: [go-nuts] Wrapping executable that takes input and output files such that it uses stdin and stdout instead (using named pipes)

2018-02-10 Thread Or Rikon
I actually fixed this a couple of days ago (see here ) without realizing what the issue was, but now I understand! Thank you! On Fri, Feb 9, 2018 at 10:27 PM Matt Harden wrote: > You need to close fIn after the copy is done. As it

Re: [go-nuts] Wrapping executable that takes input and output files such that it uses stdin and stdout instead (using named pipes)

2018-02-09 Thread Matt Harden
You need to close fIn after the copy is done. As it is now, fIn.Close() happens after io.Copy(os.Stdout, buf), which completes after your cat command finishes. But cat won't finish until its input pipe returns EOF, which happens after fIn.Close(). On Wed, Feb 7, 2018 at 5:46 PM Or Rikon

[go-nuts] Wrapping executable that takes input and output files such that it uses stdin and stdout instead (using named pipes)

2018-02-07 Thread Or Rikon
Hi! I asked this previously on Stack Overflow but so far have not received a response, so I figured I will try here as well. I'm trying to wrap an executable that takes an input and output file paths as arguments, such that it will be possible to provide the input and output as stdin and