var1=$(command)
var2=`command`
# To save both stdout and stderr to a variable, you need add 2>&1 at the ending.
var3=$(command 2>&1)
ref:
var1=$(command)
var2=`command`
# To save both stdout and stderr to a variable, you need add 2>&1 at the ending.
var3=$(command 2>&1)
ref: