I have a fairly complex piece of bash script to run through different configurations and install lots of Oracle schemas, during which I got to call "liquibase" which is a piece of java software.
What I want to do is completely silence the output from liquibase and handle these outputs conditionally depending on the output.
I try doing this with following way
#!/bin/bash
output=$(liquibase --"lots of parameters here") > /dev/null 2> /dev/null
echo "from the variable:$output"
which does same "some" part of the output, into my variable but still displays some other part on the screen. For example I get:
Liquibase 'status' Successful
from the variable:PROCESS10@jdbc:oracle:thin:@localhost is up to date
As you can see "Liquibase 'status' Successful" is not saved in my variable and written directly to screen.
So how can I redirect/save all output into a variable instead of dumping it to screen?