shell bash add tag
I have the following bash (snippet):

while IFS= read -r line

    case "$line" in \#*) continue ;; esac
    echo "Executing command: $line"
    sshpass -p$KARAF_SSH_PASS ssh user@localhost -p 8101 "$line";
    echo "Exit code: $exit_code."


This executes only once. The output is kind of this:

> #commented line
> Executing command: command1 // first line to be executed from $COMMANDS_FILE
> Password authentication // output from ssh authentication
> some other command result
> Exit code: 0.

Normally the process should continue with the next line, but it stops here. Do you have any idea why this?
If I comment the line containing the execution:
> sshpass -p$KARAF_SSH_PASS ssh user@localhost -p 8101 "$line";

than, I get listed all lines from file. Do you have any idea how to get executed all lines from file?

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.