Community & Support
Learn
Marketplace
Discussions
Categories
Discussions
General
Platform
Academic
Partner
Regional
User Groups
Documentation
Events
Altair Exchange
Share or Download Projects
Resources
News & Instructions
Programs
YouTube
Employee Resources
This tab can be seen by employees only. Please do not share these resources externally.
Groups
Join a User Group
Support
Altair RISE
A program to recognize and reward our most engaged community members
Nominate Yourself Now!
Home
Discussions
Community Q&A
How to use multiple cmd statements in one 'execute program' operator?
llohmann
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!
Find more posts tagged with
AI Studio
Accepted answers
All comments
rfuentealba
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.
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups