$> cat ./text VARIABLE=5753 VARIABLE2=""
With perl , the grep regular expression can match this value with the lookbehind operator.
$> grep --only-matching --perl-regex "(?<=VARIABLE2\=).*" ./text ""
And for VARIABLE :
$> grep --only-matching --perl-regex "(?<=VARIABLE\=).*" ./text 5753
source share