0

In my cluster I try to get all special namespaces and count them. For this I use:

threshold = $(kubectl get namespace | grep -c "my-j")

The result is a 8. But I think it is "8" maybe a string. Howe to use the output in a shell script to use a greater than?

if [ $threshold > 10 ]
then
  echo "Higher ten"
fi

Any help for me?

p10l
  • 2,520
  • 1
  • 6
  • 19
IFThenElse
  • 63
  • 5

0 Answers0