[Sidefx-houdini-list] "Hscript Sop" - workaround ?
ammon at rhythm.com
Mon Dec 19 14:18:05 EST 2005
John Coldrick wrote:
> On Monday 19 December 2005 13:12, Andrew D Lyons wrote:
> > The unix sop will execute a single command using stdin, and expects stdout
> > or it fails.
> > Unfortunately none of the tools I want to call use stdin or stdout. Also, I
> > want to manage the process(es) using hscript and perl via Ammon's perl
> > interface (Thanks Ammon!)
You're welcome. :)
> Does this mean you want to have something that lies "in the pipeline"
> of SOPs(specifically) and behaves like a Unix SOP, except they don't
> happen to worth with std I/O? I would think that you could still use
> this by piping out to a file then catting it back in(all in the same
> command call) when done. I'll admit I've never tried this but you
> might want to take a shot.
I helped Doug Bloom do this. It works just fine, and is really quite
simple. You end up with a command that looks like:
(cat > /tmp/foo.geo; cmd /tmp/foo.geo /tmp/bar.geo; cat /tmp/bar.geo)
> However, you also indicate you want to massage things, perhaps getting rather
> complicated with some Perl coding. If you're going that route, couldn't you
> do the same thing? Your Perl code pipes to stdio?
If doing perl coding, then you might as well write the perl script to
conform to the Unix SOP's way of working -- internally, of course,
you can then do whatever you want.
Ammon Riley || Pipeline Setup || Rhythm & Hues || LA, CA || ammon at rhythm.com
More information about the Sidefx-houdini-list