I have two variables as follows
SampleOutput=`some command giving output`
Status=`echo "$SampleOutput" | grep -qs "Active"`
echo $SampleOutput
echo $Status
Here $SampleOutput has value as AgentEnable=Active bla bla bla
However, $Status is coming as blank I am not sure why $Status is coming as blank when it should have value AgentEnable=Active
 
    