I am not sure what is wrong with this syntax
if [[ echo $list | grep -c 'test' ]] > 0 ; then
echo "hello"
fi
this echo $list | grep -c 'test'
prints 1
and I tried
if [[ echo $list | grep -c 'test' -gt 1 ]] ; then
echo "hello"
fi
Nothing worked. What is the right way of doing this?