Jacques44 / node-red-contrib-bigssh

remote command using ssh big node
Apache License 2.0
8 stars 12 forks source link

Execute several commands at once #11

Closed TinusK closed 5 years ago

TinusK commented 5 years ago

Question. How could I send several commands at once? For example: command 1: influx command 2: show databases command 3: exit

The above commands starts the influx database CLI. Then lists the databases and then exits. How would I do this with bigssh?

Thanks Tinus

Jacques44 commented 5 years ago

Hello,

you can send multiple commands if they are system ones… Here is an example: echo first; echo second; echo end

In your example, these seems to be several arguments of one command

You can use another « big » module names bigfile.

  1. You put the 3 commands in a file
  2. You set a bigfile node to read your file, checking payload is or not a filename whether or not you specify the filename in the configuration node or from an inject node
  3. You set « output » as a buffer
  4. You connect this node to the input of the ssh command

et voilà

Regards

Le 15 avr. 2019 à 23:48, TinusK notifications@github.com a écrit :

Question. How could I send several commands at once? For example: command 1: influx command 2: show databases command 3: exit

The above commands starts the influx database CLI. Then lists the databases and then exits. How would I do this with bigssh?

Thanks Tinus

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Jacques44/node-red-contrib-bigssh/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/ARUvM7QNcG3edlehoORWMZrCQshdZ_p_ks5vhPPJgaJpZM4cw8kh.