Running terminal

robin
robin New Altair Community Member
edited November 2024 in Community Q&A

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

Tagged:

Best Answer

  • sgenzer
    sgenzer
    Altair Employee
    Answer ✓

    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

Answers

  • sgenzer
    sgenzer
    Altair Employee
    Answer ✓

    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

  • robin
    robin New Altair Community Member

    Thank you. 

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.