perl -nle 'print $1,$/ if /\QQMSL6000 Trinity:\s*(\d+)/' input_file > output_file;