CmdProcess.xml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="CmdProcess">
  5. <title>CmdProcess</title>
  6. <para><emphasis>result</emphasis> <emphasis role="bold"> :=
  7. STD.System.Util.CmdProcess<indexterm>
  8. <primary>STD.System.Util.CmdProcess</primary>
  9. </indexterm> <indexterm>
  10. <primary>System.Util.CmdProcess</primary>
  11. </indexterm> <indexterm>
  12. <primary>Util.CmdProcess</primary>
  13. </indexterm> <indexterm>
  14. <primary>CmdProcess</primary>
  15. </indexterm>(</emphasis> <emphasis> program, input </emphasis> <emphasis
  16. role="bold">);</emphasis></para>
  17. <informaltable colsep="1" frame="all" rowsep="1">
  18. <tgroup cols="2">
  19. <colspec colwidth="80.50pt" />
  20. <colspec />
  21. <tbody>
  22. <row>
  23. <entry><emphasis>program</emphasis></entry>
  24. <entry>A null-terminated string containing the name of the program
  25. to execute. This may include command-line parameters.</entry>
  26. </row>
  27. <row>
  28. <entry><emphasis>input</emphasis></entry>
  29. <entry>A string containing the text to pipe into the
  30. <emphasis>program</emphasis> through stdin.</entry>
  31. </row>
  32. <row>
  33. <entry>Return:</entry>
  34. <entry>CmdProcess returns returns a STRING value.</entry>
  35. </row>
  36. </tbody>
  37. </tgroup>
  38. </informaltable>
  39. <para>The <emphasis role="bold">CmdProcess </emphasis>function pipes the
  40. <emphasis>input</emphasis> text to the specified
  41. <emphasis>program</emphasis>. This is similar to the PIPE built-in function,
  42. but limited to simple text input and output.</para>
  43. <para>Example:</para>
  44. <programlisting format="linespecific">IMPORT STD;
  45. OUTPUT(STD.System.Util.CmdProcess('cat','George Jetson'));
  46. </programlisting>
  47. </sect1>