TIL: to regexp match a string and use it as a condition, pipe it to grep -Eq
$ protoc --version | cut -d' ' -f2 | grep -Eq ${PROTOC_VERSION} || { echo 'Incompatible protoc version'; exit 1; }
TIL: to regexp match a string and use it as a condition, pipe it to grep -Eq
$ protoc --version | cut -d' ' -f2 | grep -Eq ${PROTOC_VERSION} || { echo 'Incompatible protoc version'; exit 1; }