06-08-2017 12:37 PM
Hello,
I am currently trying to make a LabVIEW VI on Linux Debian to run commands on the Mate Terminal. I know the proper shell commands to use on the terminal to connect an SSH server. Right now, I am in the process to try to make the process automated instead. I've used both SystemExec.VI and Pipes for this purpose. I know the SystemExec.VI requires a script file instead of sending the commands one at a time (if possible I would like to send commands one at a time to include prompts for the operator to verify the IP addresses. However, so far I've been unsuccessful since the first command is executed but then the session turns off before the next command is sent. I haven't attempted to use a shell script file yet, but before I start trying I just wanted to see if there was a better method to send shell commands to the Mate-Terminal (or any other terminal) in an automated manner.
06-09-2017 10:55 AM
Hi mamad95,
It seems that the SystemExec.VI would be your best option in this scenario. For clarification, are you looking for the shell to prompt the user or LabVIEW to prompt the user?
06-10-2017 09:15 AM
Neither, I have a set of commands that I want to execute when I open the SSH connection in an automated manner. However, once the first command is done, the connection is opened and then closed immediately afterwards. This issue is not just for SSH connection, but if it is possible to send multiple commands (that depends on the commands before it) to perform certain tasks automatically without the user's input. For example, suppose I would like to generate a text file command (using Vim) and then insert the content (the text) then issue another command to close Vim.
06-12-2017 04:31 PM
Okay, was just curious on that clarification as to the expected functionality of what you were trying to accomplish. Regardless, SystemExec.VI will still be your best option in this scenario