The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

How to use multiple cmd statements in one 'execute program' operator?

llohmann
llohmann Member Posts: 2 image Contributor I
I want to run a cmd statement on the rm machine:

"ssh user@machine && Password && db2 connect to testdb && db2 terminate"

Is it correct to write it with double &? And does anyone know if there is a limit of commands you can use with one execute program operator?

Thanks in advance!


Answers

  • rfuentealba
    rfuentealba RapidMiner Certified Analyst, Member, University Professor Posts: 568 image Unicorn
    Hello @llohmann,

    Whether you can chain or not and the length of the operators depend on whether you're using PowerShell (255 to 65535 chars), Bash (65535 chars on older versions, I think 4 million on the newer ones) or another terminal. If what you want is to execute several commands on top of an ssh connection, that's not the syntax, though. I believe it's "ssh [options] host command".

    On the other hand, I wouldn't do chained operations but rather make a group and write each command on execute commands. Why? Because it helps you debugging and because you can document it better.

    Hope this helps,

    Rod.