RapidMiner

Running terminal

SOLVED
Regular Contributor

Running terminal

Hi

 

What would the command be in Execute Program to start Terminal and execute a file? 

 

I am creating the file in RapidMiner and would need to set it to be executbale. The command I would need to exectue would be: hmod +x idprof.sh

 

Once the file (idprof.sh) is executable I would need the run the file. The terminal command here would be: ./idprof.sh

 

I am not sure what the commands inside execute program should be, any help would be appreciated.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager
Solution
Accepted by topic author robin
2 weeks ago

Re: Running terminal

[ Edited ]

hi @robin - using the command "./idprof.sh" in Execute Program will work fine.  Make sure that the script has the correct permissions to do so (use "ls -al" to see permissions for your script; use "chmod 755 idprof.sh" to allow execution permission) and make sure this complies with your security preferences for this script.

 

Example:

 

<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="7.6.001" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="productivity:execute_program" compatibility="7.6.001" expanded="true" height="103" name="Execute Program" width="90" x="45" y="34">
        <parameter key="command" value="./test.sh"/>
        <parameter key="working_directory" value="/Users/sgenzer"/>
        <list key="env_variables"/>
      </operator>
      <operator activated="true" class="text:read_document" compatibility="7.5.000" expanded="true" height="68" name="Read Document" width="90" x="179" y="34"/>
      <connect from_op="Execute Program" from_port="out" to_op="Read Document" to_port="file"/>
      <connect from_op="Read Document" from_port="output" to_port="result 1"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="0"/>
    </process>
  </operator>
</process>


Scott

Scott Genzer
Senior Community Manager
RapidMiner, Inc.
2 REPLIES
Community Manager
Solution
Accepted by topic author robin
2 weeks ago

Re: Running terminal

[ Edited ]

hi @robin - using the command "./idprof.sh" in Execute Program will work fine.  Make sure that the script has the correct permissions to do so (use "ls -al" to see permissions for your script; use "chmod 755 idprof.sh" to allow execution permission) and make sure this complies with your security preferences for this script.

 

Example:

 

<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="7.6.001" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="productivity:execute_program" compatibility="7.6.001" expanded="true" height="103" name="Execute Program" width="90" x="45" y="34">
        <parameter key="command" value="./test.sh"/>
        <parameter key="working_directory" value="/Users/sgenzer"/>
        <list key="env_variables"/>
      </operator>
      <operator activated="true" class="text:read_document" compatibility="7.5.000" expanded="true" height="68" name="Read Document" width="90" x="179" y="34"/>
      <connect from_op="Execute Program" from_port="out" to_op="Read Document" to_port="file"/>
      <connect from_op="Read Document" from_port="output" to_port="result 1"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="0"/>
    </process>
  </operator>
</process>


Scott

Scott Genzer
Senior Community Manager
RapidMiner, Inc.
Highlighted
Regular Contributor

Re: Running terminal

Thank you.