Multiple commands using JSch

For executing multiple commands in sequence, you can create a command string like below:

String script ="pbrun su - user; cd /home/scripts;./sample_script.sh”

Execute it and pass this string to your method above.

Leave a Comment