sendCommandLine

sendCommandLine ( string command , boolean[default:false] _waitAndRetrunResult , long _timeout ) : string

Send a command line (terminal, DOS mode, etc.)

Example

sendCommandLine("putty -ssh login@80.20.35.42 21") //on Windows, open a session with Putty
console(sendCommandLine("ls /my/folder/"), true) //On Linux, list the content of a folder

sendCommandLine(["/bin/bash", "-c", "python3 /root/script.py"]) //On Linux, if a command does not work (here "python3 /root/script.py"), it is a good idea to do like that and to put it in the third part of a ["/bin/bash", "-c", "X"] array

Parameters

command

Your command line, as you send in a terminal. This parameter can also be an array, ex: ["/bin/bash", "-c", "echo bla > bla.txt"]

_waitAndRetrunResult (optional)

true = wait the end of the command and return the console value.

_timeout (optional)

If ._waitAndRetrunResult = true, use this argument if you need to put a limit in seconds during the return waiting.