In order to capture the error output from a command in bash shell and use it further in a bash shell you can you the following
COMMAND_ERROR=$( { command_with_error_output; } 2>&1 )
In order to capture the error output from a command in bash shell and use it further in a bash shell you can you the following
COMMAND_ERROR=$( { command_with_error_output; } 2>&1 )