>grib_compare ../data/regular_latlon_surface.grib1 ../data/2d.grib1
[indicatorOfParameter] long values are different: [167] and [168]
[paramId] long values are different: [167] and [168]
[shortName] string values are different: [2t] and [2d]
-- previous error in count=1 shortName=2d stepRange=0 levelType=sfc level=0 --
In the output we see that not only is the short_name is changed from 2t to 2d, but also indicatorOfParameter and paramId are changed. This is because all the keys related to the short name are changed simultaneously. The exit code for the previous command is 1 as the comparison failed.
>grib_compare -b shortName,indicatorOfParameter,paramId ../data/regular_latlon_surface.grib1 ../data/2d.grib1
In this case the exit code is 0 because the comparison is considered successful according to the blacklist provided.