perl -le 'print "Version $] : ", -T "spk_pre_180208_180715_180419_bpo12_p.bsp" ? "text" : "not text"' Linux: Version 5.010001 : not text Version 5.014002 : not text Version 5.016003 : not text Version 5.026001 : tex