Actually, you interpretation of the bash script is not exactly correct. The << operator says to treat the following lines "as if" they are coming from STDIN, not STDOUT. So sending something to STDOUT from ooRexx buys you nothing from a redirection standpoint.
And you have actually touched on a weak area of ooRexx. There really is not a clean way to create a STDIN stream which can be supplied to another process (program) from inside an ooRexx script. You really are pretty much stuck with writing your input stream to a file and then feeding that file as the STDIN stream to the external program. I hope all this is clear. David Ashley On Thu, 2013-09-12 at 16:06 -0500, pr gramly wrote: > i am converting a bash script to ooRexx and am not sure how to handle > the redirection that is used in the original in ooRexx. > > so the shell script is something like this: > #!/bin/sh > set -v > ndmcli -x << EOJ > submit unc0001o process snode=Z9NNODE > pend ; > EOJ > > the script invokes the ndmcli program and uses the combination of > set -v > i.e. "print lines of shell as they are read" which i think sends them > to STDOUT > > and the > << EOJ > 'here document' to pass the lines to ndmcli > > so here is my ooRexx version: > > #!/usr/bin/rexx > /* __ ooRexx __ */ > > "ndmcli -x << EOJ" -- invoke NDM cmd line, & pass PROC stmnts > say 'submit unc0001o process snode=Z9NNODE > ' > say 'pend ; > ' > say 'EOJ' > > Exit > > SAY writes to STDOUT so i thought it would work the same, but instead i > get an error: > > sh: warning: here-document at line 0 delimited by end-of-file (wanted 'EOJ') > > so how do i pass a group of lines to another program? > > i looked at queuing them all up on the external data queue and using > LINEOUT but it writes to STDOUT as well. > > what am i missing here? > > Phillip > > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. Consolidate legacy IT systems to a single system of record for IT > 2. Standardize and globalize service processes across IT > 3. Implement zero-touch automation to replace manual, redundant tasks > http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk > _______________________________________________ > Oorexx-users mailing list > Oorexx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-users ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk _______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users